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
0answers
14 views

Library system manager

I'm new to JavaScript OOP and still playing around with it. I have put together a few specific questions over specific details throughout the code that are bothering me. I wanted my ...
3
votes
1answer
16 views

Statistical Analysis of X-Wing Game Dice

I was in a discussion about mechanics of the X-Wing miniatures game where we were discussing a couple of the ways to improve attacks and I put together this small C# console application to determine ...
4
votes
2answers
86 views

Printing an N*N array in the rectangular/circular/spiral fashion

The problem is to print an N*N array and fill it with numbers(starting from 1 at (0,0)) in the rectangular/circular/spiral fashion, going inwards, ending at the N*N value. Also find and count the ...
4
votes
2answers
165 views

Person Info Manager

In the process of teaching myself JavaScript. Starting to branch off into OOP designs and did not want to continue until I knew I was doing it correctly. Is this a common or accepted way of ...
3
votes
0answers
12 views

jQuery modal dialog plugin

I'm working on creating a new jQuery modal plugin. I'm pretty good at jQuery but still pretty new to the whole object oriented plug-and-play style of plugins so I used a different plugin I found ...
2
votes
1answer
22 views

Emulating super() in Python 3.x using Python 2.7

Depending on the name of the first argument, self.__sup or cls.__sup behaves like super() in ...
-1
votes
0answers
24 views

Implemeting strategy pattern with multiple variables? [on hold]

I am trying to implement Strategy Pattern for handling my content serialization and deserialization. So I have four kind of requests namely CREATE, RETRIEVE, UPDATE, DELETE and for each request I want ...
5
votes
2answers
33 views

Todo-list practice code accepts title and list

I am new to OOP principles and best practices. People often say I write "unpythonic code," so give me your perspective on how to do things better. ...
1
vote
0answers
17 views

Loading xml data to shift array keys

I'm working on improving myself by teaching myself how to make classes to remove reppetitive pieces of code and create a class that does it for me. I have the following xml document. ...
0
votes
0answers
19 views

Library to query Edmunds' API

I'm attempting to create a library to query Edmunds' API. I'm not sure if the design is over-engineered and would like some feedback. Here is the code: The API class (takes and endpoint and ...
-2
votes
0answers
20 views

MusicBox design [on hold]

I need to model a music box that can do the following: Play songs. Have a playlist. Have a collection of CDs to play. Add song to its songs queue. Does this design seem OK? ...
1
vote
0answers
35 views

Re-Ordering the draw order for my entities in my Isometric game

Introduction I am making a 3D Isometric game. I have a Tower, filled with Block's in a 3D ...
1
vote
4answers
69 views

PHP MVC implementation without a framework

I've been using PHP for years and in every project I've ever done I've included the HTML, PHP, SQL etc ... in the same page. Upon looking through Github at large projects like WordPress and MediaWiki ...
4
votes
1answer
39 views

Class Design: Calculating statistics from weighted values

I was wondering if this is the best possible design for my situation. Note that this is a simpler version of the problem I am trying to tackle. I have a class ...
0
votes
1answer
35 views

Binary to decimal converter in JavaScript

This exercise with a test suite is from here. I did not intend to use ES6 features, it's plain old JavaScript. That's why I seek advice more on the good practices, performance side, than modern syntax....
2
votes
1answer
39 views

Simple object oriented design for an Temperature class

Design a temperature class for nurses to store patient temperature and the method of taking the temperature. How would you handle different units of temperature? Write a function to determine if a ...
4
votes
2answers
82 views

3-Axis Coordinate System for a Chinese Checkers Board

About a year ago, my brother and I came up with this cool idea for how to solve the problem of determining if any given "cell" on a Chinese Checkers board was adjacent to the cell in question. ...
-1
votes
2answers
58 views

Partially complete text-based adventure game [closed]

I have run the code and it's error free. As this is partial code which only defines one class of the many more to come, there is no output involved yet, therefore I am looking for testing whether the ...
-1
votes
1answer
104 views

Using templates and function overloads to set DOM attributes [closed]

I'm making a library to build and manage a website. I want to control what gets to be inserted. For example I don't want to be able to insert ...
5
votes
0answers
58 views

File downloader using Java, multithreading and HTTP Range request

I'm making a file downloader using Java. The project is on GitHub; I have included the most relevant excerpts here. I separate the file into parts and download them using HTTP Range request, with ...
4
votes
1answer
47 views

My version of Conway's Game of Life in Java

I am currently only doing one generation. I'd like a review of my code. Game of Life: The universe of the Game of Life is an infinite two-dimensional orthogonal grid of square cells, each of ...
3
votes
0answers
27 views

Factory to augment JS classes with validation methods

I have some validation classes. To keep things smooth, I create a single class that has those validation classes inside of it. That class will be a singleton, and gets injected into my other classes. ...
3
votes
3answers
67 views

Add multiple instances of a property to a list [closed]

I'm a novice programmer asking first question here although I've gotten tons of help from previous questions. The following code is abstracted from what I currently have working. ...
4
votes
1answer
65 views

Stack implementation in ES6

Finally happy to see that now we can have iterators and generators. I also need to try to have private properties too so that we have well encapsulated data structures and I see that there are Proxies ...
2
votes
0answers
35 views

Input-reading library for Node.JS part 2

Note: This code is a rewrite of the post I mentioned here since according to CR policy I cannot update the same question. This is somewhat didn't went through that much thought process and I wrote ...
1
vote
0answers
55 views

Wrapper for a vendor API that lacks common interfaces

I know basic Java, but I struggle sometimes with object orientation design. There is a vendor api I use, and I wanted to wrap it to be reusable as a lib in other projects. All the services from the ...
3
votes
1answer
41 views

Bukkit API Town plugin for Minecraft

I'm creating a town plugin for the game Minecraft using the Bukkit API. It works fine and all, however I'm not satisfied with the quality of the code and I'd like to know how I can improve. I've been ...
3
votes
1answer
57 views

Input-reading library for Node.JS

Recently I have been busy with nodejs and I thought to create something like this Java input library, so I started with some rough code like below: ...
4
votes
3answers
94 views

Program to reverse a string using std::string

Background: I'm trying to learn C++ and I'm doing that by writing some programs by myself. I'm decent with C, but I'm having trouble translating to OOP paradigm. I'm reading from learncpp.com and a ...
3
votes
1answer
47 views

Use of scoped objects in a JavaScript Tic-tac-toe implementation

I have been using the w3 org's JavaScript Best Practices web page's examples for coding an object literal for a game. It is my understanding that I should use this to keep all my variables and arrays ...
2
votes
1answer
72 views

Linked list using dynamic memory [closed]

I created a simple linked list to test what I've learned so far and if I manage everything correctly. If you see syntax errors is't because of copy-paste. I just want to know if i'm making everything ...
1
vote
1answer
64 views

Moving To Object Orientated Programming

Please keep in mind I am new and still learning when reading the following. What I am doing I have the following code which pulls a sport, tournament and round NR, from a DB table called ...
3
votes
0answers
42 views

Check the latest internet connection speed

On the journey of learning software design I am now taking a slightly different approach and thinking to focus on some real world projects. After code reviews I would be publishing them to the ...
0
votes
0answers
19 views

Inheritance is better or composition design pattern in this scenario? [migrated]

Design and implement Cash Register: Given a number of items you will be required to calculate the total bill. Items are charged for in a couple of different ways: A given price for each item, e.g. ...
7
votes
2answers
142 views

Load and analyze a list of people from a file

I recently completed a programming task in Java for a job that was javascript heavy but the hiring company wanted some Java knowledge. I've been using Java since the turn of the year. Other than ...
1
vote
0answers
34 views

AWS Redshift wrapper class that automates similar types of loads from S3

I have a AWS Redshift wrapper class that automates similar types of loads from S3 for me, and I have recently adapted it to work for Spark jobs, which don't require a manifest, and instead need a ...
1
vote
0answers
23 views

Developing a Feed Reader in the MVC Architecture are there better posabilities?

I'm redisigning my old Feed Reader APP with the MVC architecture, to understand the OOP better, currently there is just registration functionallity implemented, ...urrently workiing on the session ...
5
votes
0answers
86 views

SVG mosaic creator

Although my code works as expected, there are a few gotchas. A single row is not filled at once; instead, I can see partially filled rows during the rendering process(Fixed in the updated code below....
1
vote
0answers
35 views

Event log implementation with TDD

Below is some code that implements an 'event log' whose purpose is to record events and periodically check that all events were recorded in chronological order. The collection of events must be ...
1
vote
1answer
42 views

Simple router for updating users

I need to know if I am going in the right direction with my code so far. I am really trying hard to transition from procedural, page-based programming into OOP MVC. So far I have written a simple ...
3
votes
1answer
52 views

A class to create and modify SQLite3 databases with a terminal

I would like feedback on the class I've written. The purpose is to dynamically create and interact with SQLite3 databases, accepting lists of complete or incomplete statements. ...
2
votes
2answers
69 views

Triangle class implementation

I need some advice to improve my Triangle class. I know some of my code is sloppy, such as in the Triangle constructor. can ...
4
votes
1answer
173 views

Guessing game in Java - Take 3

I already have two versions of this code reviewed (thanks @Bobby). They can be found here and here. The question is still the same. The goal is maintainability and following best practices. Jar....
0
votes
0answers
24 views

Model controller relation

I am creating a PHP app in MVC (no framework). I am having a difficult time understanding how the Model and the Controller communicate in an optimal manner. User.php ...
3
votes
1answer
26 views

Tracking orders efficiently using a Python class

I've written a Ledger class for a daemon process, which is supposed to keep track of an exchange's orderbook. My main concern is the way I keep track of the orders -...
3
votes
1answer
83 views

Simple Wizard Goblin User Story Test Driven Development

I have written this to practice Test Driven Development. I would like to know if the process is right and how it could be improved. Problem Statement : A wizard can cast spell on goblin and make his ...
4
votes
1answer
57 views

Guess how many are in the jar game in Java - Take 2

Original question can be found here I took the advice I got to heart, and re-wrote it. Once again I'd appreciate any advice as to how I can improve this using best practices. Jar.java ...
6
votes
3answers
70 views

nonstd:: non standard classes

I am looking for people's opinions on my use of a set of non standard "standard classes". Basically I am working on a 'modern' C++ Lexical Analyser and Parser Generator duo to replace flex and GNU ...
2
votes
1answer
77 views

Guess how many are in the jar game in Java

I'm reading up on java and have completed a fairly simple console game. I'm unsure on my own structure when considering maintainability, separation of concerns and best practices. Any tips or ...
-1
votes
2answers
67 views

Java dog hierarchy

I am supposed to write a small java program. The program must contain 3 different kind of dogs. The dogs can bark and move, these methods can be represented just by System.out.println();. Some dogs ...