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

learn more… | top users | synonyms (5)

1
vote
0answers
8 views

defining attribute type in UML if using PHP

As my PHP projects are getting larger and more complex, I am looking to use UML to help me plan and design better systems. This is the point where I wish I had paid more attention to those boring as ...
0
votes
4answers
50 views

Hide Public Properties of Base Class in Derived Class

I was wondering if we could hide public properties of Base Class in Derived Class. I have following sample problem statement for calculating Area of different shapes - abstract class Shape { ...
5
votes
2answers
54 views

am i wasting server time if i call one method for each request for insertion

i am working on PHP on OOP's concept, this is the class called 'connect' which connects to database and also inserts the request in database_ class connect(){ public function insert($column, ...
1
vote
0answers
5 views

Using a Moose alias with MooseX::Constructor::AllErrors

I'm trying to use an alias with MooseX::Aliases and MooseX::Constructor::AllErrors However, the two don't seem to play nicely together. Consider the following example: package Alias { use Moose; ...
1
vote
2answers
52 views

Using a parent class and the OO structure

I apologise for the abstract nature of this question (cannot post real code for business reasons) but I have inherited some code that I think is wrong in terms of structure and I would like someone to ...
0
votes
2answers
27 views

Objects consumption pattern

I was trying to solve a specific problem that, in facts, is an example of a more general issue. Let' say that we have a couple of objects where one object depends on the other: Bitmap AnImage; // ...
1
vote
3answers
42 views

from the outside reach the class properties

public class Departman { Person _p = new Person(); public Person p { get { return _p; } set { _p = value; } } } public class Person { private string ...
0
votes
2answers
74 views

What is the best way to write Java Script Class

Can help which one is best usage/implementaion from the below two type of javascript class creation (OOPs concept)? way 1: var MyClassName = function(){ // private variables // private functions ...
2
votes
5answers
68 views

Design pattern to use

I want to make the program with the following classes: Class Player, which stores some information about players with get/set functions. Player can be as AttackPlayer, which will have own data with ...
0
votes
1answer
48 views

how to do something before setting a public attribute of the object?

If I get a class looks like this : class a { public $aa; public $ab; } $t = new a(); now, If I type $t->, I would got a tip list under zend Studio, but now I need to do something like ...
0
votes
0answers
12 views

Circular dependence/reference between element and element manager

I'm trying to create a small platformer game. I have a Manager object that holds references to all game Elements (player, enemies, etc.) so they are updated, drawn, etc. It is, therefore, capable of ...
1
vote
2answers
54 views

Python OOP: functions from a dictionary do not affect class instance variables

I am new to Python but write programs for a hobby, so I have moderate knowledge of OOP and computer programming in general. I have started working on an simple animal simulator. In what might very ...
2
votes
1answer
70 views

What are some of the more modern design patterns? [closed]

Some design patterns are as old as the hills like strategy, factory etc. but I have noticed there are some that are "newer" like CQRS. I totally missed the introduction of CQRS and only recently was ...
0
votes
0answers
26 views

Protected database table and fields in PHP Object

I have a feeling this is an elementary question, but could not find anything on it. I'm working on someone else's PHP CodeIgniter code (including an extension of ...
1
vote
3answers
61 views

OO PHP multiple 'methods'?

This isn't a direct code question, but more of request for guidance. I'm fairly new to OO PHP, I'm usually an old school developer, but I want to do things the modern way, perhaps the right way. I ...

1 2 3 4 5 1277
15 30 50 per page