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

1
vote
0answers
21 views

Priority queue Implementation

Below is the unsorted array and sorted array implementation of priority queue. Code directory structure: ...
0
votes
1answer
13 views

SQL Query Builder in PHP

I have made a Query Builder, (not the full version of it yet) but I wanna ask the if there are someone out there, there can improve this code even more. Will be nice to know so I can code the rest in ...
-1
votes
1answer
82 views

Mergesort - Database

Code directory structure: ...
-4
votes
0answers
33 views

Improving usage of RAM by applying lazy loading [on hold]

I'm working with a program that deals with files, I can do several things like rename them, read the contents of them, etc. Today I'm initializing it as follows: ...
-6
votes
0answers
47 views

Inheritance in JavaScript [on hold]

Given animal is a 'class', is this a good / the way to inherit, like in other languages? ...
-1
votes
0answers
24 views

References to constants values within a Python app — budtrack

I have written a Python application called budtrack, which has a purpose of monitoring a budget. I know I kinda reinvented 'the wheel', but the purpose of the project was to practice user requirements ...
5
votes
3answers
457 views

Simple Product Inventory software using C# and OOP

I did this small program, as part of a list of coding exercises. The list proposes the coding of a small software that's supposed to manage an inventory of products. Here's what is requested: ...
6
votes
2answers
171 views

Generic immutable object builder

I've made an object builder which can create all sorts of classes, it can also create immutable objects. There are 2 requirements that must be met in order for this pattern to work with fully ...
14
votes
4answers
2k views

Mini RPG equipment code

what do you think about this code? It's upgraded version of: Classes representing items in an RPG game ...
-3
votes
0answers
27 views
3
votes
1answer
53 views

Jesse and Cookies

Jesse loves cookies. He wants the sweetness of all his cookies to be greater than value K. To do this, Jesse repeatedly mixes two cookies with the least sweetness. ...
3
votes
2answers
108 views

Method for validating properties based on passed conditions

I wrote a method for validating properties based on passed conditions. It works well, but declaration takes more space than the actual condition. Is there any way to make it shorter? ...
4
votes
1answer
212 views

Classes representing items in an RPG game

I wrote a little program in C# that contains classes representing Items in RPG game. I wanted to have access to all inherited classes parameters from list contains parent Item class instances, so this ...
1
vote
0answers
35 views

Implementation of Resenblatt’s perceptron ,LMS algorithm Single Layer Network and Back-propagation algorithm (MLP) Network

I wrote a Java program implementing Resenblatt’s perceptron Single Layer Network, Least Mean Square algorithm for Single Layer Network and Back-propagation algorithm (MLP) Network. I'm trying to write ...
1
vote
0answers
29 views

Validating each process object from its own validator

I have two processes, and for each process, I will get different GenericRecord object (this is an open source classes) and I need to validate those ...
4
votes
2answers
67 views

Using method chains when rendering a scene

Is writing Java code in chain like _hud.getStage().getCamera().combined an ugly practice? ...
2
votes
1answer
51 views

A simple Dice Game Using only Static methods

This is a simple dice game that requires you to get two numbers from the user and then it generates 15 other numbers and checks if the generated numbers are the same as the numbers typed in. Try to ...
4
votes
1answer
52 views

Android “ServiceListener” class for listening web services

I'm new in Android, Java and the whole object-oriented programming, I'm trying to develop an app which needs to listen on many web services (PHP scripts written by me returning a standardized JSON ...
2
votes
2answers
101 views

WPF wizard-like app

I'm designing and developing wizard-like app for populating the database I created with data from different sources. It's my first attempt to design and develop well-structured object-oriented ...
5
votes
2answers
52 views

Apostle Galaxies: dict subclass with disk caching

I am an astrophysicist working on large simulations as part of the APOSTLE project. The output of the simulations I use are large (TBs) and are stored in tables spread across multiple hdf5 files. ...
7
votes
1answer
79 views

Sliding puzzle game of fifteen

I've made the Game of Fifteen in Unity this is how it looks : The code is rather short there's one class for the pieces and one for the game logic : MovablePiece : MonoBehaviour ...
1
vote
1answer
26 views

Using HikariCP and JDBC to store data for a Minecraft plugin

I'm creating a plugin for the game Minecraft, and with it I'm using HikariCP and MySQL to store data between server restarts. I've created working code but I'm wanting to improve it. While the code ...
4
votes
1answer
106 views

Object Oriented TicTacToe

I have been trying to learn to program in a more object oriented manner and I am at the moment working on a Tic Tac Toe game. I have tried to split my classes so that it would make sense, OOP wise. I ...
2
votes
1answer
121 views

Template matching program to find an image within an image

The program I've made is a template matching program which finds an image within an image - where's Wally/Waldo! I've complete the program and all works fine despite being very slow (around a minute). ...
4
votes
1answer
81 views

Simple Calculator in Java and Swing

I'm new at this and I'm almost done with learning basic Java. I made this just to see if I could do it. I just want to know if there's anything I can do to make it better. ...
3
votes
1answer
75 views

Simple Blackjack game in Python

I am trying to create a simple Blackjack game. I am using GIST because the code sample takes forever to use. Current code: ...
3
votes
0answers
33 views

C++ OpenGLBuffer class, wrapper around the raw OpenGL api

I am trying to code a thin wrapper around the OpenGL so I can use it more convenient. This class is not 100% done yet, but I don't want to do all typing for nothing. And I think the design is clear. I ...
7
votes
3answers
200 views

Multiplayer GameObject design

I created a really basic game class. A game has GameObject instances, which currently have a position only. This code is running on the client, and in each loop ...
4
votes
1answer
104 views

Java - Tic Tac Toe

I am a self - taught coder, and have been learning Java for the last 2 years. I have recently created a tic tac toe game in Java. I have rearranged the program into separate classes & methods. I ...
2
votes
1answer
22 views

Event emitter in JavaScript without using Node's built in class or any additional libraries

I need to create this eventEmitter class with the functions listed below. I think I could clean the code a little but don't really know where to start. ...
1
vote
3answers
93 views

Project Euler problem solver in windows forms

I've programmed a few Project Euler problem but they are all separated in different solutions so I decided to group them all together in a nice Windows forms application. Here's how it looks like : ...
3
votes
1answer
45 views

Machi Koro card/dice game

I have taken advice on board and had a go at a new project, to write a program that lets you play the card/dice game, Machi Koro. The complexity of the game isn't too great, which makes it a good ...
4
votes
2answers
68 views

Dijkstra's algorithm using a specific structure

I have implemented Dijkstra's algorithm using a slightly modified version of the structure and class posted here. Unfortunately, I have ruined the efficiency. I am intent on using this structure. I ...
3
votes
1answer
47 views

Mastermind game - Evaluating the guess in Ruby

I am a novice coder and I am very new to algorithms. Something about my code leads me to believe that it is unnecessarily verbose and/or inefficient. I am building a command line Mastermind game, and ...
1
vote
1answer
108 views

Splitwise clone done right

I have started this project basically for learning perspective and wanted to learn good object oriented design. What I am trying to do is making clone of something like this but this is a command line ...
3
votes
3answers
79 views

Graph representation implementation

I wanted to represent graphs in Python, and wrote the following class. I don't care about values associated with nodes or the weights of the connections between them, simply the connections between ...
4
votes
2answers
83 views

Class template for beginners

I want to allow anyone that has never coded to make classes depending on my template with little to no knowledge of Python. These classes need to do 2 things: Inherit from other classes similar to ...
1
vote
1answer
45 views

Tic Tac Toe in Ruby

I'm a novice programmer going through the Odin Project. I just finished up building a command line Tic Tac Toe game and I would appreciate some feedback on object-oriented design, methods, verbosity, ...
5
votes
3answers
118 views

Vending Machine class

I am looking for ways to improve the code that I wrote for this. Consider a simple vending machine class. The machine accepts tokens and dispenses cans of refreshing beverages. Write a complete ...
5
votes
2answers
37 views

Parse Run Length Encoded file for cellular automaton data

I wanted to be able to parse Run Length Encoded (*.rle) files into something usable for a cellular automaton simulator (e.g. Conway's Game of Life and such). Here ...
0
votes
0answers
41 views

Assignment of Array to Property in class constructor

I'm writing classes to decode and persist Message's sent via TCP. Each message contains many DataField's. I have a simple class DataField class that holds some ...
6
votes
2answers
57 views

Activity Assigner - that randomly assigns each student to an activity

I am trying to improve my object-oriented modelling and programming skills and hence made an attempt at solving the problem statement from this link. Problem Statement A teacher wants you to help ...
5
votes
1answer
125 views

Command-line blackjack for up to 6 players in Python

Here is command-line blackjack for up to 6 players (not including dealer). Would love any and all feedback! ...
1
vote
1answer
33 views

Creating and calling objects sequentially in Tkinter with Python 3

I am trying to build a very simple user interface in Python 3 using Tkinter to be used in windows. and have written a code which is not efficient - it is excessively long for no good reason. I am ...
7
votes
1answer
199 views

C++ Quiz game w/questions in random order

This is a 10 question quiz that assess's the user's knowledge of the C++ programming language. Upon the start of the program some ASCII welcome art prints. The questions, answers, and correct answer ...
3
votes
1answer
36 views

Inventory of objects with item types and quantities

I am thinking about how an inventory could be designed. The requirements for this inventory will be the following: There will be predefined item types in the inventory. The user can define new item ...
0
votes
2answers
53 views
5
votes
0answers
56 views

Python-style object library for Clojure

Background I am authoring pulley.objective, an Open Source library that provides an object system inspired by Python's object model. I have some features ...
2
votes
1answer
94 views

OOP PHP for handling upvoting

kinda new to OOP, and I wanna know if i'm heading into the right direction. Also I should mention I'm not using AJAX AnswerVoteManager.php ...