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 (3)

2
votes
1answer
32 views

DataStream interface for reading and writing data

I am writing a C++ library which will interact on files, memory buffers and remote files accessible with the HTTP protocol. To handle that, I've decided to create some classes that will use the ...
1
vote
1answer
22 views

Selecting orders submitted by a user, segregated by status

I have recently started using Laravel as my chosen framework. It is my first time using a framework. As I have made progress through my project, my controller methods have started to increase in size. ...
5
votes
2answers
85 views

Color structure with single field for multiple properties

I'll get right to it, this struct is used a lot throughout my programme. This struct is responsible for only things regarding colour, not anything else. I'm ...
3
votes
3answers
65 views

Linked list implementation - follow-up

Follow-up to this question as recommended. Can this code be improved from an OOP paradigm perspective? ...
1
vote
1answer
63 views

OOP paradigm implementation of a linked list

Can this code be improved from an OOP paradigm perspective? ...
4
votes
2answers
75 views

Free Code Camp - Pairwise

I'm working through the Free Code Camp syllabus and I'm on to Intermediate JavaScript Algorithms. This Pairwise problem was the last challenge in that section. The section came just after "Object ...
2
votes
0answers
18 views

Filtered Search Plugin

I need opinions on how to improve this code example github ...
3
votes
1answer
23 views

Adjusting Angular.js model based on browser width

I have an Array of 5 objects, some key values need to be changed based on the browser width. ie: 5 cols, 4 cols, 3 cols or 2. vs.streams is an Array which is tied to a AngularJS model. When the ...
3
votes
0answers
35 views

Solidworks EPDM add-in

I need to expand the functionality of this project to encompass more commands (you may notice in GetSelectedFilePaths() I have a case that is not currently used, ...
4
votes
1answer
39 views

CMake build system

I wasn't quite sure where to go with this, and this seemed to be the best place I could think of so I thought why not. I threw together a build system for C++ projects today using CMake and I wanted ...
2
votes
0answers
14 views

OOP Web scraper using regex to grab tag contents

I'm about learning about implementing the solid principle in PHP. I want to create simple content crawler/grabber from some websites. This crawler will grab the content from the website url. Since we ...
0
votes
0answers
13 views

Creating a custom object in PHP, that is sent to a SOAP service [closed]

I am trying to build up a customer object in PHP and then send to a asmx web service. Everything works fine except that I build an array inside the PHP. When I send it to the web-service only the last ...
-2
votes
0answers
16 views

Choice between generic message and different type of messages [closed]

I want to parse around 5 different type of messages and prepare a generic object and pass it to clients.Messages have different type of data , for example one message provides list of fields and other ...
6
votes
2answers
145 views

Address book in Java

I've been learning Java for a month now using programmingbydoing.com in addition with reading the Java reference. I've had very very basic programming experience and I'm trying to improve my skills. ...
1
vote
2answers
21 views

Function queue for synchronous execution

This code was made just simply for fun! The idea of this code is to allow to add functions to a queue, that will execute them sequentially. With this in mind, it also allows to execute them with a ...
1
vote
0answers
26 views

Particle Swarm Optimization – second follow-up

This is a followup post to Particle Swarm Optimization. I have a few things I still need to know: Is there a better way of passing variables to the subclass (Particle) other than via the subclass ...
0
votes
0answers
9 views

Chain-able promise file system functions

I'm trying to invent an easier way of working with the file system. Here I chain promise methods together. ...
0
votes
0answers
39 views

Optimising nested for loops Java [closed]

I am having a code that does scheduling of a days events based on the exact fit basis. I am kind of having three nested for loops and I'd love to hear thoughts on ...
1
vote
0answers
26 views

Pattern for prototypal class creation

Last night I made a object oriented pattern that I find very useful. With this pattern, one can quickly assign a new class, add to an existing class, and chain methods together. Its pretty short, I ...
1
vote
1answer
57 views

Snake class for simple Snake clone

NOTE: I'm only including the snake class (only one file) here because the rest of the code doesn't need reviewing. If you need to see the complete code for whatever reason, it is available on GitHub ...
3
votes
1answer
124 views

PHP class architecture and dependency injection

Let me start off by saying I am not new to PHP or PDO, but very new to OO PHP, and have been struggling to get a firm idea of best practices in my head regarding dependency injection and structuring ...
2
votes
1answer
68 views
5
votes
1answer
62 views

Fight simulator

I have been learning Scala for a couple months and want to get a more concrete understanding of proper oop practice. I find it difficult to optimally use traits, abstract classes and inheritance. ...
3
votes
4answers
82 views

Simple Blackjack implementation

Continuing my previous post, I have completed my game of Blackjack, the simple version. I am aware it's very long. I haven't included some of the suggested changes suggested in the previously to the ...
5
votes
1answer
91 views

Deck of cards implementation

Update: Simple Blackjack implementation I was playing Blackjack in a phone app and decided to try to do the game in Java, using the console for a start. So far I'd like to review the deck of cards ...
-2
votes
2answers
46 views

Manipulating strings and character positions

Write a program that manipulates two strings. The program inputs two strings (string1 and string2) and a character (...
2
votes
1answer
56 views

Retrieving result sets from a MySQL table

This retrieves result sets from a MySQL table. The objective of this function is to correctly retrieve any number of rows (with $sql) from a MySQL table, binding ...
5
votes
1answer
36 views

Writing a class to hold Arduino Properties for an Arduino I2C Debugger

I have this class which mostly holds a bunch of properties and their setters. I also have wrappers for some functions of another module. Here is the class: ...
3
votes
1answer
62 views

Create a pop-up class

I'm new to OOP, so I tried to learn from tutorials how to create a class in JavaScript/jQuery. But tutorials don't give you feedback from experienced coders. Is the approach to create a pop-up OK (see ...
-1
votes
0answers
72 views

Airline scheduling simulation

I have a simulation system that simulates airline scheduling. There are different entities representing flight, airport, gate etc. There are also many algorithms and the whole system is run using a ...
0
votes
1answer
57 views

Upload file program

I'm working on an upload file program in PHP in OOP style. I need some feedback about code. index.php ...
3
votes
2answers
76 views

Build a Person class, delegate don't duplicate

I am currently learning javascript and I attempted to make a Person class (note - this was part of a practice exercise, so some of the design decisions may have ...
4
votes
1answer
59 views

OO shopping cart class + product class interaction

I built a small store site for learning purposes. I loaded my 'products' from the db into a products class. I used a method from this class to display the products in HTML. Of course, the HTML ...
8
votes
2answers
74 views

Particle swarm optimization - follow-up

This is a followup post to Particle Swarm Optimization. I wrote a script in Python for particle swarm optimization and I posted it here to get comments on the design. I was told that encapsulating ...
7
votes
3answers
116 views

Implementing Dynamic Network Message Handling (Part II)

This is an iterative review request of this other question I posted. As a follow up to that previous question, I changed the pattern completely and I went to an events-based approach, which might be ...
4
votes
1answer
55 views

Database classes for job offers

I've recently started using PHP OOP, and I'm now working on an application where different company representatives can create job offers that candidates can look at. I have a variety of objects for ...
0
votes
2answers
55 views

Creating multiple objects from SQL server extract

I've created a simplified prototype solution as a sort of proof of concept before starting a larger program. Here is the test data used to build the objects: ...
5
votes
2answers
92 views

Composing a prototype chain in JavaScript

As an exercise, I wrote a simple function that composes a prototype chain from a list of objects by appending to the prototype chain of the first object, the rest of the objects. This is the code ...
4
votes
1answer
88 views

Cohen-Sutherland 2D line clipping algorithm

Please, review the following implementation of Cohen-Sutherland line clipping algorithm (p-91): Bits.cpp ...
3
votes
1answer
40 views

Class modelling for a shogi notation reader

I have made GPL software in GitHub whose purpose is reading shogi notations (shogi is Japanese chess). I have been told that my software modelling is underdeveloped in this question and advised to ...
3
votes
0answers
38 views

Action dispatch for a combat class

My problem is that I have a piece of code logic that I'm having trouble fitting into an OO approach, and I was looking for design patterns so that the following code would no longer rely on the ugly ...
3
votes
3answers
62 views

Matrix class with lots of tiny methods

I have been following the advice to make tiny methods that does just one thing and does it well. I also have been keen on reducing or eliminating duplication as much as possible. But when a very ...
11
votes
2answers
135 views

Implementing Dynamic Network Message Handling

I'm trying to handle network messages in a dynamic, and effective way, though I feel I've overthought it again. As of now, I have a very structured approach, but it feels as if it's a lot of overhead ...
8
votes
2answers
65 views

Take These Buttons Back

I created a side bar of buttons for my game, the idea being that if you click on the "main" button of the group, the rest of the buttons in the group would pop out from the side of the screen. Later, ...
4
votes
1answer
43 views

Class(es) for animating objects on a canvas

I'm building a simple canvas animation engine as an exercise in learning ES6. Coming from C++ and Java, I miss static properties, but I've read that "Prototypes having data properties is generally ...
3
votes
3answers
99 views

Subscribing an Object to its own Events

Is it appropriate for the class to subscribe to its own events like this? Should the class not subscribe, and instead move that code to before the ...
7
votes
1answer
106 views

Class to manage config data to allow DI

I'm writing my own framework (purely for learning purposes, SPL, OOP, patterns, etc) and have written a class to manage config data throughout the framework (not front end/view, just the core ...
4
votes
1answer
67 views

Native JavaScript to-do list app using Jade

For practice and to explore my vanilla JavaScript (no-library) weaknesses, yesterday I made a Todo app, similar to what you see floating around for AngularJS blog demos. How can I optimize this? ...
2
votes
1answer
54 views

IRC server implementation in Python

People say that the code in my implementation is generally obscure. Can you point me what looks bad? ...
3
votes
1answer
296 views

Avoid using object to hold int, bool, double application setting values

I have some code to handle integer, double, Boolean, and string settings. Right now, each setting variant extends an abstract class, where the setting value is stored as an ...