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
1answer
69 views

Web application for consuming a REST service

The application is a web application that consumes a REST service. Web config has the REST URL along with the parameters. REST URL and the values are passed as ...
4
votes
1answer
34 views

Handling users connection to the application

This is a simple User class that I'm using throughout the application for anything related to the users. To tell if a user is logged in or not, I check the presence ...
4
votes
1answer
60 views

HND Java module (vending machine simulator)

As part of the distinction requirement, I am required to ask for testing/review of my code. There was no time allotted for this in class, and as such I am turning to the folks of StackExchange for ...
8
votes
3answers
153 views

Implementing OOP in this Java word count program

I wrote a program that reads a text file and then outputs the unique words, their frequency, and the line numbers that word appears on. It also counts the number of sentences in the text file. All ...
2
votes
1answer
27 views

Easily registering WordPress custom post types and taxonomies

I am developing a library to easily register WordPress custom post types and taxonomies. But the problem is I can't use one instance of object because of adding the object in WordPress hooks. So ...
0
votes
0answers
34 views

Refactoring data processing method into classes [closed]

I'm building an application that processes email messages in a mailbox, and, for each message, transforms the attachments and then replies to the sender. This application implements an existing ...
5
votes
0answers
30 views

ECMAScript text component

At the moment, I'm learing ES6 and how to write classes. And I'd like to know if I'm doing things right and I have some points that are not clear to me. Please find my code here at bitbucket and ...
4
votes
0answers
43 views

Temporary file utility class in Python

I decided to write a tiny class to automatically write and delete a file given filename and content. It is intended to make testing IO less verbose. I include a small example usage. ...
1
vote
1answer
58 views

Parsing video files from a given directory

I have written a little class that is basicly looking for video files in given directory and then parsing some info about those files. Finally it saves everything in a list. To properly run this you ...
10
votes
4answers
1k views

Simple text RPG in Python

I am trying to teach myself to code using Python. The following is the first real program I have written from scratch. I feel that it is messy and in need of improvement, but I am either unsure of ...
2
votes
2answers
48 views

Binary Conversion in Java

Before implementing a GUI I tried performing it at CLI first and I also tried to implement it by using calling methods to another class. ...
6
votes
4answers
103 views
6
votes
2answers
144 views

Rock, Paper, Scissors Game in C++

Below you will find my first attempt at a C++ implementation of the classic game Rock, Paper, Scissors. If someone could look it over and point out or suggest any things that I could change to improve ...
2
votes
1answer
40 views

Different methods of API that use similar Services

I have three methods in API running similar code snippets. For this reuse the code inserted a switch-case according to the API method. It's good practice that? I ...
4
votes
2answers
95 views

Object-oriented Rock, Paper, Scissors game in C++

This is my code for a simple Rock, Paper, Scissors game. Users have the choice of playing against a computer, or watching a "computer player" play another "computer player". The code for the computer ...
3
votes
1answer
42 views

Generating realistic terrain data - Part 2

I've made a "heightmap" terrain generator similar to my previous one, except this one has some improvements, and some new features. The way this one works is similar to my last one, but slightly ...
-1
votes
2answers
42 views

A simpler multiply and addition polynomial function [closed]

I'm working on a project where I have 2 classes, one class for Monomials and another one for polynomials which are built out of monomials. I would like to make a simpler method for adding and ...
0
votes
1answer
25 views

Python class inheritance with parameters [closed]

Is this the preferred/confect way to write class inheritance with parameters? ...
3
votes
1answer
58 views

Business logic in service method

I'm currently writing a small asset tracking system. The implementation should meet the following requirements: The system; scans the transfers every 15 minutes. If the transfer is accepted by ...
3
votes
1answer
62 views

Football Data Design

I'm working with the XMLSOCCER.COM API. I'm a little confused with how to best design the application. The problem I'm facing is that teams do not have a league ID so I couldn't associate a team with ...
12
votes
1answer
112 views

Data item prototype in a Javascript data structure where object instance functions see own data

I'm working on a complex Javascript application which includes its own data structure. The previous version's data structure was rather chaotic, and I'm looking to replace it with something where: ...
42
votes
11answers
3k views

Sales tax calculator, rejected for being not OOP

I applied for an Application Developer position. They require all their applicants to complete 1 of 3 programming assignments. I picked one for sales tax calculation. It was quite simple. ...
9
votes
3answers
99 views

Simulating a river ecosystem

I'm currently working my way through a textbook to enhance my beginner Python skills (Goodrich, Data Structures and Algorithms in Python). The first, somewhat in-depth problem involving OOP was the ...
7
votes
1answer
49 views

Tic Tac Toe implementation in Ruby

Here's my first shot at implementing Tic Tac Toe in Ruby. After watching Gary Bernhardt's Functional Core, Imperative Shell, I thought this would be a great exercise in trying out the ideology ...
6
votes
3answers
185 views

Enum Constants for Convert Units

I have a few constants in a game that I'm doing for hobby. I need to store constants for the total size of the a Physical World and the size of the Screen. I can position the world's objects to the ...
11
votes
3answers
168 views

WebGL shader program management

I'm writing a tiny WebGL/JS framework to improve my knowledge of JavaScript and WebGL. Following is a class that wraps a Shader Program and provides methods for setting the shader parameters (AKA ...
2
votes
2answers
41 views

Performance of MySQL helper class for VB.NET

I have inherited this code from my company. It is acting as a helper class for a database and written in VB.NET until date. It is working properly and almost 5 to 10 commercial packages I am ...
6
votes
3answers
113 views

Make Email Sender more maintainable and testable

I want to be able to improve the way I am sending these emails because it is currently not testable (via Mocking) and it is hard to maintain. Main Sender (I also need an Async method on there but I ...
5
votes
1answer
57 views

Breakout game using Java 8 & Slick

I’ve written a basic implementation of Breakout using Java 8 & Slick (~400 lines of code). Please let me know of any design/OOP improvements that can be made (any improvements in general are ...
1
vote
0answers
53 views

Javascript Class System

Warning: The code snippet does run two alerts, just so you know. I wrote a javascript class system with the idea of making declaration simple and clean and instantiation even simpler, along with ...
6
votes
2answers
118 views

PHP OOP example using animal classes

I've been reading up on OOP concepts such as: polymorphism, inheritance and encapsulation and would like to know if I am even close to using these concepts correctly. ...
10
votes
2answers
520 views

Binary Calculator in Java

I'm a beginner in Java and I tried to create a program that will perform basic arithmetic operations on binary numbers. BinaryOperations class: ...
12
votes
2answers
172 views

A reusable ProgressIndicator

There was a Tweet from @ExcelEasy earlier this week, that linked to this article, to which I replied with a little challenge: @ExcelEasy well done! #Challenge: make a more #OOP one without using ...
6
votes
2answers
73 views

Templated queue implementation

I wrote an implementation for a simple queue in C++ (for practice, since there's an stl queue). I've been trying to focus on memory management and the rule of three. Any suggestions/improvements? ...
0
votes
0answers
22 views

C code to represent a dataset and a 'window' of data

I'm fairly new to C so I'm looking to see if I'm heading in the right direction. This bit of code is to define a structure which represents a dataset (in this case, a GDAL dataset and some ...
3
votes
1answer
46 views

PHP validation class using method dispatch

I wrote this validation class. I'm kinda new to the whole OO(PHP) style, so I don't know if my class is acceptable. I looked around at other people's validation classes, but most are huge (1k+ lines ...
3
votes
3answers
121 views

Student Classroom class

I'd like to know if the following class design is good or bad: ...
4
votes
1answer
61 views

MVC'd login form

I've written this small MVC login application as an example for someone, would anyone let me know what they think of it? index ...
3
votes
0answers
32 views

YouTube video intro, and autoscroll when video ends

This code creates an intro video using the Youtube API, screen text written by JavaScript with a typewriter kind of effect. How can I rewrite this as succinct object-oriented code? Also, I'm not sure ...
5
votes
2answers
52 views

Player assignment in Tic-Tac-Toe

I am building my first OOP program, Tic Tac Toe. I want to conquer it in chunks, but the first part for me is the intialization of the program and the creation of the two players. I want to get some ...
3
votes
3answers
67 views

Device-dependent image descriptor fields

In a Java class that belongs in a library, I have a field size that indicates size of image. It must be int, but some values are ...
4
votes
1answer
225 views

Router for personal use

This is router I created for use, however, I wish to refactor this code and make this more robust. I would really appreciate anyone who can: Point out how to make this code more robust, clean and ...
0
votes
0answers
166 views

Python TKinter data entry window GUI for SQLITE3 table

I would like to offer for review a simple tkinter GUI window in Python 3 to be used for data entry into an SQLite database table. As a noob, this is my first attempt at OOP and my first experience ...
5
votes
1answer
90 views

Guess the Number Game in Python

I have been using Python to learn programming, but I am just recently beginning to utilize classes. I have a basic game below. Please review and let me know what I should improve on. ...
6
votes
1answer
174 views

LiveDate version 2

LiveDate has the ability to display the current date either by asynchronously fetching the time from a server or by just using the client system date. It's only as ...
0
votes
0answers
17 views

Send Ajax Request Function v2

I would like to get a full on review on my sendAjaxRequest function. Suggestions for any improvement are always welcome! sendAjaxRequest.js ...
0
votes
0answers
85 views

Simple Bootstrap Panel Plugin

Right now I'm studying OOP with javascript/jQuery and so far upon reading tutorials over the internet and with the helping hand of google, I come up with a way to do it based on my own understanding. ...
2
votes
0answers
37 views

Configuration class

This is my first serious programming effort, so I'd like some comments about what I did so far. Project structure: ...
1
vote
1answer
47 views

Rover on a grid

I have ridden to much about MVC and SOLID, so I have a mess in my head. I have written a small MVC application and I need your experience and sober mind. index.php - Start point of my app ...
3
votes
1answer
68 views

Building the HTML body view

I created a library class in CodeIgniter that handles building the HTML body view. This class builds the body, adds content and adds javascript element tags at the end. The body is built by using a ...