Questions tagged [object-oriented]

Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.

Filter by
Sorted by
Tagged with
3
votes
1answer
238 views

Refactor a subroutine that divides date range into quarters.

The subroutine below, GetDetailsQuarterly, accepts two dates. Then it writes out each quarter that falls within the date range. It also gives the first and last day of the quarter. I really don't like ...
4
votes
1answer
590 views

User php class. Should I connect to DB in this class?

I have small Class which handles user's information. (name, surname, login, hash of password). Also this class can activate, register and login the user. This means I should connect to DB. Is it ...
3
votes
2answers
1k views

PHP Output Block Defining and Best Practices

I've been rolling around several ideas or approaches in my head, and none seem any more useful or "right" than another. I'm sure this is extremely objective but I'm looking for a close-to-definitive ...
11
votes
7answers
4k views

Rock Papers Scissors in Python

I am a newbie to Python and have started object-oriented programming recently. I have implemented a "Rock Paper Scissors" application in OOP. I would like for you to evaluate my code, and tell me ...
5
votes
2answers
841 views

OpenGL VertexArrayObject class

It seems to play up sometimes and I'm not sure if this is due to the class itself or the way I'm using it. Can someone confirm that this is a 'good' implementation of a ...
5
votes
1answer
2k views

Review for a PHP socket proxy

For my current project we are commnunicating with an old mainframish hospital information system. This system has a service called 'Facelink' which is a simple TCP connection with a fixed set of ...
2
votes
2answers
2k views

Subclassing UIButton

I need to subclass UIButton, however the design of UIButton makes this really painful. This is because to create a button you ...
7
votes
2answers
6k views

Recursive database actions

I am been using a code pattern for recursive database actions in my applications. I create two class objects of a database table, singular one (e.g Agent) for holding single record with all fields ...
15
votes
2answers
2k views

Guessing game - am I using the concept of objects in Java properly?

I'm new to Java and find it hard to grasp the concept of objects. I wrote a simple guessing game to practice the concept of OO programming but I am not sure if I am doing it correctly. The objective ...
10
votes
2answers
727 views

Object Paradigm for PHP, Practice in Design

I've created and I manage a point of sale web application built in PHP which has thus far followed no clear guidelines or methodology for development; it's operation is completely procedural. In turn, ...
4
votes
1answer
212 views

Sorting Visitors

I started to write a code with top-down tests. My first version, grow to something like this: ...
6
votes
2answers
658 views

JSON API for some bank account

I have been developing this class, and was wondering if anyone had any thoughts on how I can improve the performance of it. ...
9
votes
1answer
441 views

Database method to query

I have a database class that in __construct() initialize a PDO connection and insert the instance into a $db private var. Now i'm working on a method that can be ...

1
70 71 72 73
74