Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.
-2
votes
0answers
23 views
Bowling Game with JUnit tests [on hold]
Is it possible to rewrite this code without arrays?
The Game class:
...
0
votes
0answers
20 views
Assignment of Array to Property in class constructor [on hold]
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 ...
3
votes
1answer
18 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 ...
4
votes
1answer
94 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!
...
-3
votes
0answers
9 views
Inheritance: Pass values in constructor or override method [on hold]
If you have multiple classes inheriting from ParentClass, and ParentClass needs to access a specific value from each child class,...
1
vote
1answer
29 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
141 views
C++ Quiz game w/random questions
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
30 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
29 views
0
votes
0answers
12 views
PHP: Best way to implement model layer in MVC [on hold]
I've been working with PHP for few years.
Till now i'm still confused about designing model layer in MVC model because somehow MVC model againsts OOP style.
In the MVC, model layer in charge of ...
5
votes
0answers
26 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 ...
1
vote
0answers
26 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
...
-1
votes
0answers
15 views
Using inheritance to make a 2d tic tac toe game into a 3d tic tac toe game [on hold]
I was tasked with making a 2d tic tac toe game utilizing OOP concepts. I did that fairly easily, but now when tasked with making a 3x3x3 tic tac toe game by use of inheritance to create derived ...
1
vote
2answers
69 views
One object to handle all my database manipulation needs
I have created an object to handle all my database manipulation needs. Here is my object constructor and one of its functions:
...
0
votes
0answers
22 views
find the two longest word made of other words [on hold]
I want to find two longest words from array ,made from smaller words.
my code are given below.
current out put is:
catxdogcatsrat,
ratcatdogcat,
catsdogcats,
dogcatsdog
required output is:
...
7
votes
1answer
83 views
Text-based adventure game using classes and XML
I am studying software engineering and we just started learning about object oriented programing. I wanted to be a bit ahead of all others, so I decided to write a little text-adventure using classes.
...
2
votes
0answers
25 views
-4
votes
0answers
12 views
Hospital managment system [closed]
Need help in designing classes for my project.
Hospital is composed of departments and wards.
Department has staff.
Person *-------------*Hospital
...
1
vote
0answers
38 views
Ruby - Asteroids Remake
After some feedback on my last Ruby Code I decided to start another one with two big concerns in mind:
Trying to adequate my coding to the OOP paradigm
Trying to follow the Ruby Style-Guideliness
I ...
3
votes
2answers
67 views
Creating a model record for a database
I'm trying to expand my use of classes and better understand how/when to use them. Please review the code and let me know if I'm on the right track or where I need to make improvements. For example, ...
5
votes
2answers
90 views
Connect Four (the OO approach)
I saw some approaches to the connect four game on a site. None of them seemed very OO like.
Therefore I'd like to present my implementation and request suggestions on how to make this code more ...
4
votes
2answers
61 views
Python REST API clients
I am working on a project right now, where we need to search different APIs, then clean & persists data to database and finally pushing to Elasticsearch.
The high level code looks like this:
<...
5
votes
1answer
70 views
Generating RPG Characters (Objects)
I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. I am trying to ensure I do not advance my knowledge ...
6
votes
1answer
88 views
Designing a toy dependency injection library
Just for learning purpose I thought to write a simple and useful dependency injection service which would just do dependency injection but also it should expose its core too which would let the client ...
4
votes
3answers
91 views
Generating 50 Random Shapes
I am a beginner Java programmer. I have just finished up an assignment and would appreciate some advice and/or constructive criticism on my program. For context, I have the assignment details, ...
2
votes
1answer
97 views
Modelling an account manager in OOP
I have this task of modelling a system where given a group of users each can keep track of their expenses. The basic requirements are as followed:
To be able to give credit to an user.
Find all the ...
3
votes
2answers
62 views
Loading items from XML document
I'm making a game in Unity and I need to have a inventory/item system, I decided to store my items in simple XML document which I later read from. I'm planning to have different varieties of items and ...
2
votes
1answer
71 views
Defusing a bomb using a state machine
This code is a solution for /r/daily_programmer #293.
The idea of this challenge is, you are given input in the form of colored wires:
...
4
votes
0answers
67 views
Test and implementation of a reorderable data structure that stores number of users (classifiable as per gender, country, etc.) of an Application
I have implemented a data structure that allows storage of number of users of a hypothetical application in a tree-like data structure in nodes as per their classification based on categories such as ...
5
votes
4answers
690 views
Generic Null/Empty check for each property of a class
I have created a method to check for null/empty values of class properties and if any null property is found I'm stopping the checking process and returning the result as true. I'm used a solution ...
3
votes
2answers
67 views
Singleton Pattern + unavoidable Public Constructor
We have an object that needs to be converted to a different type before storing it in database. For that purpose, the library provides an annotation over the field that specifies the appropriate class[...
2
votes
1answer
67 views
Refactored game of Snake
A week ago I requested a review of my code for a game of Snake.
First game of Snake
I made some changes based on your answers and now I want to show you present code. Something else to modify here?
...
10
votes
4answers
1k views
C++ quiz game with 25 questions
I created a quiz game program with 25 questions, 4 answer choices, correct answer and 4 points awarded per question. I realize this code isn't the best; I am still a beginner and this is my first ...
3
votes
1answer
57 views
Managing documents with manager class
So I have a program that visualizes data from files (csv,txt,etc.). These files are saved to database as individual tables. In my application I have DocumentExplorer...
6
votes
0answers
54 views
Battleships Player vs Computer Algorithm
I am a Year 12 student studying CS for my A-Levels. I have had previous Python experience but it is obviously not to professional/industry standard. Therefore, my goal for this review is for my code ...
2
votes
1answer
49 views
Simple class to mimic a dynamic array
for my c++ class I was asked to write a class with the following characteristics:
Implement a vector replacement that operates only on integers (you don't need to use templates like the normal STL)...
3
votes
1answer
46 views
List abstraction using array
Following this reference, below is the list abstraction implementation using array,
...
5
votes
4answers
123 views
Loosely coupled movement
I'm working on my ability to write loosely coupled applications that follow SOLID principles. This is a simple application trying to demonstrate the concept. Is it OK? Am I going along the right lines?...
0
votes
2answers
45 views
No getter/setter on model with many instance vars
I have been reading a lot of material on how to become better in OOP, DDD etc. While reading Object calisthenics and Getters/Setters. Evil. Period. I got confused. Let me explain it by example.
I ...
3
votes
2answers
175 views
First game of Snake
I'm making baby steps in Java programming and I just ended coding basic game: Snake. Could you share with me what is needed to improve in this code? What about OOP here?
GameBoard.java
...
4
votes
1answer
32 views
Framework for composing algorithms
I am implementing a game in python, which will give the user a sample encryption, and explain each step from plaintext to cipher. The task for the player is to decrypt a word by undoing each step ...
4
votes
2answers
100 views
PHP OOP Login Script
I'm new to both PHP and OOP and would like some constructive feedback on a class I made.
I have a "main account" login system already setup and working; when the user logs in they're presented with a ...
1
vote
1answer
69 views
3
votes
0answers
103 views
Adding swipe support to multiple classes
I have implemented swipe functionality using UIPanGestureRecognizer in a project.
What I have done is added PanGesture to ...
4
votes
1answer
149 views
Simple box with tabs
While trying to become better in javascript I've written the following simple box with tabs:
Javascript: (entire code (HTML/CSS) is in the snippet)
...
6
votes
8answers
2k views
C++ calculator using classes
This is my first time using classes objects and functions. What can I improve on?
...
1
vote
1answer
56 views
Student Class in C++ using sstream for format
Based on my previous review, I'm posting another Hackerrank Class solution.
Problem Statement
We can store details related to a student in a class consisting of his
age (int), first_name (...
3
votes
0answers
50 views
Perlin Noise Generator - Round 2
After a good first review, I've much improved my code which is generating Perlin Noise as a means of 2-D terrain generation. My first attempt was not very well met because at the time it was a lot ...
3
votes
0answers
113 views
Simple home-brew filter design for a future GUI
I decided to make a small program for filter design, to practise C++. I intend to also add a GUI, later on (Qt, most probably), so I thought that the way the program would go in the ...
0
votes
0answers
15 views
An Object Oriented Attempt to Render Different Cards based on their Source Type
So I'm working on a test project to learn Angular 1.x better. I have this as a Factory that gets required by the main.js. There are different cards that are rendered differently depending on the ...