Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.
0
votes
0answers
7 views
Finance Manager
Somewhat experienced with javafx, but this is my first potentially large javafx project that I recently started and wanted some feedback on anything that could be done better or more efficiently thus ...
-2
votes
0answers
21 views
Adding additional data to buniess model [on hold]
I have problem with extending classes used business logic and pass them to another systems. For instance I have RetailOrder class that is model for order processing classes. It holds ids of articles, ...
2
votes
1answer
49 views
Create Database Connection and run the Insert,Delete,Update queries Class in C#
Recently while developing our demo project I had to a write a lot of repetitive code for executing the database queries(Insert,Update,Delete). So, I have put all the repetitive code into a class ...
3
votes
1answer
44 views
Class to hold data for a fund
Requirements:
To store strings into variables, check if they are valid for the field.
To be able to easily unit test the validity checks with different parameters.
To throw exception when a check ...
6
votes
1answer
84 views
Beginnings of a Chess game
I'm pretty new to programming (haven't written much code myself, only read code for my computer science studies etc) and I keep getting confused by how to best structure my code.
Let me get a bit ...
2
votes
1answer
43 views
Shopping basket script in object-oriented PHP
I have made a shopping basket script that allows the user to add and remove items from the basket, and edit quantity of items that are in the basket.
I am new to OOP, and I would like to get your ...
3
votes
2answers
36 views
Product search script Object Oriented PHP
I have made a search script in OO PHP that searches for products based on the inserted criteria, selects them and checks whether a sale is on, if it's in stock and other features.
I am new to OOP so ...
1
vote
0answers
26 views
Pythonic way of reading a binary file into objects [on hold]
I'm trying for the life of me to parse a binary file of records and store the information into an array of objects.
Essentially, when I've done something similar, it was in C, and the method I'd go ...
2
votes
1answer
39 views
Validations in filter class
For my web application I have written AuthenticationFilter which validates each request to check against CSRF attacks, Browser Checks, Session Validity etc. Instead ...
4
votes
1answer
80 views
A simple MP3 file arranger
I am creating a simple Mp3 Files Arranger the Project is on Github
Questions:
How can I optimize this app?
Am I violating any OOP principle?
Is it readable?
How can I make it better?
GUI.java
<...
4
votes
2answers
41 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 ...
5
votes
3answers
67 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 ...
5
votes
2answers
116 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
180 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
17 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 ...
3
votes
1answer
33 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 ...
6
votes
2answers
44 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
18 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
22 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 [closed]
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
89 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
43 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
39 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
41 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 ...
5
votes
2answers
88 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
59 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
105 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
1answer
100 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
49 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
29 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
68 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
67 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
42 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
101 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
56 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
66 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
44 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
143 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
91 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
37 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
43 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
53 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.
...