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)

1
vote
0answers
15 views

Simple event system

This is a class which provides a simple event system mechanism: ...
1
vote
0answers
17 views

Workout tracker app

My controller is calling my primary class Exercise to get values based on my data model. The data model contains a number of other classes that do calculations and contain data structure objects for ...
0
votes
0answers
22 views

Pangram test with non-ASCII characters [on hold]

Pangram Determine if a sentence is a pangram. Determine if a sentence is a pangram. A pangram (Greek: παν γράμμα, pan gramma, "every letter") is a sentence using every letter of the ...
2
votes
1answer
20 views

Draggable toolbar header class, inheriting from a draggable parent class

I have written a draggable parent class using a module pattern: ...
4
votes
3answers
130 views

Count words in a string

Continuing my TDD from exercism. Write a program that given a phrase can count the occurrences of each word in that phrase. For example for the input ...
-5
votes
0answers
23 views

removing an object using lists, stack and queue [on hold]

Trying to remove all objects with the colour orange from my program which are in the list ,stack and queue. Currently having difficulty on how to progress from my code and just need to get an idea of ...
1
vote
1answer
20 views

Python exception handling class - Getting as much details printed

I'm trying to write a Exception Handling class in Python so that I can re-use. If you have any ideas on how I can improve this to output more detailed information I would appreciate it: ...
1
vote
0answers
157 views

Using a singleton for a collection of discounts to calculate?

I'm wondering if using a Singleton for a storage of discounts is the right way to go. This is because I will be looping over all added discounts in another class. client code ...
0
votes
1answer
74 views

Business logic parallelization engine

In my Java 8 application there are 3 different classes but each of them contains one similar method, which is dedicated to parallelization of the business logic ...
1
vote
0answers
38 views

Multiple Persons enter room simultaneously and exits after specific interval of time

Here is the link to git repo of my application I am currently implementing just to have better understanding of OOP as well as learning Concurrency (Atleast a try :D) What is the whole ...
2
votes
1answer
76 views

C# data class with public auto-implemented properties with constructor that specifies each

I have a dll and an executable which both deal in configuring certain things for a much broader software solution, and the code below in particular is directly meant for database configuration. (Here ...
0
votes
0answers
26 views

Creating Mysql interaction/connection using OOP in PHP [closed]

I'm very new to OOP and but am aware of the concepts after educating myself with some good resources despite this I want to get expert knowledge on the direction I'm taking for this project I've set ...
-1
votes
0answers
37 views

Is my implementation of String in C++ good? [closed]

Following up on My implementation of String in C++. I wrote my string class. The code works, but could anyone tell if I am doing anything wrong? It is an exercise from the "Accelerated c++" book: ...
2
votes
2answers
44 views

User registration with Repository pattern

I have been developing a simple login registration page with PHP using the repository pattern. Following are the business rules : During registration Email must be unique. Email must be a valid ...
2
votes
0answers
63 views

Tic Tac Toe C++ follow up

I have finally found some time to redo the last tic tac toe game I posted. I have gotten rid of "Magic Numbers" as well as any typos(if their are any please point them out but I think i rid myself of ...
4
votes
2answers
124 views

My implementation of String in C++

I wrote my string class. The code works, but could anyone tell if I am doing anything wrong? It is an exercise from the "Accelerated c++" book: Implement the Str class, but choose an ...
5
votes
1answer
60 views

A “pointless” animation program

The assignment description for this code is this: Each time the user clicks the Circles button, randomly colored circles flow into the display and continuously change their shapes. Here is a ...
3
votes
1answer
57 views

Recording all instances of a class - Python

In a programme that I am writing, I need to loop through all the instances of a class, the way I got around this was by appending every class to a list like below: ...
6
votes
3answers
71 views

Capturing temperature information for a patient

I just finished writing a program that captures temperature information for a patient. I'm looking for suggestions on how to improve the code that I have. Although what I have compiles and does what I ...
4
votes
2answers
62 views

Using PHP PDO to Fetch Employee Details

Introduction Hi, I am finally making the move to object oriented PHP. This has been something I have been quite reluctant to do, but I now feel that it could benefit me, and bring me up-to-date with ...
5
votes
2answers
103 views

Single Linked-List Implementation in C++

I haven't done much C++ coding the last few years, so I've been reviewing in preparation for upcoming interviews. I wrote a minimally functional singly linked-list. I'm using my implementation for ...
2
votes
0answers
18 views

object.Menu.js - animates a Menu that morphs

Looking for general feedback on the code structure and not so much the naming conventions. I have a single event bus and do not use namespaces and plan on adding additional menu items later and maybe ...
4
votes
1answer
39 views

Initializing characters in a visual novel game

I am making a visual novel game and I was wondering is there a better way of setting character attributes and initializing than the way that I have done down below. As you can see I did an abstract ...
1
vote
0answers
21 views

Idiomatic abstract inheritance with Go

I am currently discovering Golang, and I try to implement some random variable generation functions similar to R functions. To avoid code repetition, I'd like to use inheritance, which is quite ...
5
votes
2answers
54 views

Menu Model class using Model-View-Presenter

The following code is for my Object Oriented Programming class. My program simulate the cashier's machine to order food. The code uses Model View Presenter. This class is the model. I have an ...
3
votes
2answers
71 views

Booking system for shows

Kindly accept my apologies as Java is something my mind cannot digest no matter what I do. At the moment I have an assignment and have written a piece of code and have used Constructor (I think so) ...
0
votes
3answers
96 views

Multilingual greeter object

After coming across Douglas Crockford's views on class-free OOP, and doing away with new and this in Javascript I tried defining an object with its own variable and function, and returning it in JSON, ...
2
votes
1answer
48 views

Texas Hold'em classes

I am working on a simple Texas Hold'Em dealing simulator. I am new to Python and was hoping to get some advice on my use of classes here. I feel like I am not using them as efficiently as possible, ...
3
votes
1answer
45 views

OOP and non-OOP versions of layout and page animation code

I am trying to learn how to write more object oriented javascript code, but I am having a hard time understanding the correct way to do it, and how it is useful for front end development. As you can ...
3
votes
1answer
48 views

Uploading multiple files using a class

Below I have implemented a class that will validate and upload files based on the specified rules. ...
2
votes
1answer
51 views

Stock performance app

I'm building an app that tells you a stock's percentage change in price between two dates by using Yahoo's API. Given a stock ticker and two dates, it currently outputs the percentage return to the ...
8
votes
1answer
101 views

Accessing the Stack Exchange API

Part of a project I'm getting started on requires access to the Stack Exchange API for certain data, as a result I built a .NET implementation to interact with it. The implementation is pretty ...
2
votes
2answers
68 views

Tic Tac Toe C++ MVC design

This is my new version of my Tic Tac Toe game written in C++. I tried to follow community advice by separating I/O from the game logic and view (MCV). The code works great, and I am looking to see if ...
4
votes
3answers
41 views

User ranking system

I have written my first code of object oriented Python. Prior to this I have spent a week on learning the concepts and understanding the technique. I would appreciate it somebody reviews this and give ...
2
votes
2answers
47 views

Fetching a number of data tables from a stored procedure

Within a method, this code is calling a SPROC that is doing a 'select *' from 9 different views. This method then goes on to access the returned DataTableCollection ...
4
votes
2answers
72 views

Tic Tac Toe C++ with classes

After A ton of work I finally have a working Tic Tac Toe game that I am very proud of, and it works great. I would like some feedback on anything that can be improved/ needs to be changed. I had a ...
4
votes
2answers
26 views

Window-size-dependent content toggler for an HTML form

I had to build a responsive component which allows the user to display specific content in a page. I called it the contentToggler. Here is my component in action ...
1
vote
1answer
51 views

Mapping one JSON message format to another in Java

This code takes a JSONObject, passes it to another class which is responsible for mapping the data in the JSONObject to a different format (Still a JSONObject though). I'd just like confirmation if ...
3
votes
3answers
148 views

Football game using factory and command patterns

I'm really confused about the interview I did with a firm. They told my code was not expert, but almost intermediate level java. Requirements Football Scoring Dashboard Develop an application that ...
4
votes
2answers
88 views

Project Euler #23 Non-abundant sums

I'm having trouble optimizing the Project Euler problem number 23 : A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of ...
-1
votes
1answer
36 views

merging json object

Hi I am trying to merging json objects which has common value. This is original JSON ...
1
vote
1answer
46 views

Custom C++ STL-like doubly linked-list(C++11)

This is the link list I just created. It works fine for now, but would want to know if I could make it better. list.hpp ...
0
votes
1answer
36 views

Modbus connection over TCP and Serial port

I want to improve my code. In this code I don't like my contructor, but without it I keep getting an error while trying to connect NullPointerException.Any ...
5
votes
2answers
67 views

Determine playing card

I would like a code review on the coding I did for my assignment. The reason I have asked here is because my lecturer has no intention of going through (Don't ask me why, I asked before and he said ...
1
vote
2answers
77 views

HTTP Response/Request Class

This is just a simple class that you can you use to send requests and get the HTML code. I would like to get feedback on this. For your request you can set: URL Request method: GET or POST Request ...
1
vote
2answers
42 views

Game engine for 2D games in Java

I am writing a 2D game engine library that I can use for simple future games, and I've been told that it is written very procedural rather than objected oriented. I was wondering what I should do to ...
4
votes
2answers
191 views

Project Euler #11 Largest product in a grid

Question Link to the exercise : https://projecteuler.net/problem=11 I'm currently working on the Project Euler exercise's and I just finished the eleven exercise. It's working fast enough it takes ...
4
votes
1answer
71 views

Printing the right diagonal of a matrix

I am solving a coding challenge whose objective is to print the right diagonal of a matrix. And below is my code to do that. ...
2
votes
1answer
36 views

Regrouping JSON object

I wrote a JavaScript source which regrouping by new key i.e. following JSON to the other: ...
4
votes
2answers
89 views

Parsing a string as fast as possible that is using comma delimiters

I have made a simple static parser for a bigger program. This parser takes a string that has comma deliminators and I need to separate the strings in to a vector for handling in a different section of ...