Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [object-oriented]

Object-oriented programming is a programming paradigm using "objects": data structures consisting of data fields and methods together with their interactions.

2
votes
0answers
11 views

Listing the playlists on which each song appears

I created a way to export my Google Play playlists to a text file and also a way to export all of my songs in Google Play to a text file. Now I have both the song list (in an array format) and ...
3
votes
0answers
43 views

Metaclass to run a __first__ method for the first instantiation of a class

I had an idea for a __first__ special method for a class. It would be run after __new__ and before ...
3
votes
0answers
41 views

Object-Oriented Breadth-First Search Implementation

My goal is to write a GUI application where a user can create a maze and select an algorithm. The passage of the algorithm from a selected start and end point should be visualized. The following ...
1
vote
1answer
646 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 ...
0
votes
1answer
25 views

Battleship Game in Java

I wanted to make a very simply Battleship game in Java, any feedback is welcome. Nevermind the getters / setters. Just assume they are there. ...
1
vote
1answer
578 views

Printing results in XML

I have been writing PHP programs in the MVC pattern for quite some time. But I am not sure if I am doing it right. For instance, I have this PHP file that prints results in XML, and I put this file ...
-4
votes
0answers
13 views

Creating 45 variables and properties for CRUD program [on hold]

I'm new in OOP world, I've been using functional paradigm in vb past 5 years and I have a task to link a vb form to a table which has got 45 fields. It's a Form with Textbox, comboxbox, richtextbox......
6
votes
0answers
23 views

Free body diagram generator using MVP for VBA

Based on my understanding of Model View Presenter (MVP) I have it generate a diagram. Is this a correct implementation of MVP? What deficiencies are there in my implementation? UI Generated diagram ...
-2
votes
0answers
24 views

I'm trying to make a collection class in C# [on hold]

As a side project i'm trying to remake one of my favorite games from the old days, moria/angband. I'm doing it from scratch and in C#. In order to store the inventory I have the following classes, ...
2
votes
1answer
44 views

Query builder with OOP design

I am designing a query builder, where the user can just add conditions or groups, and each group can, in turn, have conditions in it. I came up wit the below class design. Can this design be improved? ...
4
votes
1answer
90 views

Word Chain Implementation

The idea originaes from the CodeKata19, find a word chain for two words of a wordlist example 1 turning lead into gold: ...
2
votes
0answers
60 views

Feels like I have no clue what I'm doing in my “project” - “GAME”

Never had any programming course. Am not programmer. Does not plan to be. If anyone has a lot a time to lose, I feel like I have no clue what I'm doing / that a lot of my code is very badly ...
5
votes
1answer
3k views

“Deal or No Deal” console game

Can anyone check this code of mine for improvements? This was coded using Java with OOP concepts. Game Class ...
-1
votes
0answers
21 views

Updated quiz code, how to imlement C# OOP classes to accomplish the same thing [on hold]

I asked for help on a C# Quiz program I am writing for my ENGR115 class in this thread: Original Question Roland replied with some good advice for me, which I followed, and came up with this revised ...
5
votes
3answers
93 views

Student grade calculator using classes/ structs in C++

I am trying to teach myself C++ and using Problem Solving in C++ by Walter Savitch. This is a program project from the book that I used to practice using classes/ structs and would like some feedback, ...
-2
votes
1answer
47 views

How to correct this OOP? [on hold]

I have 2 classes user and topics, a user can follow/unfollow topics, but i don't know where to add the follow function, in User class or Topic class ? ex:- ...
0
votes
1answer
49 views

Experimenting with a OOP design pattern in JavaScript

Initially, I was using the class syntax to structure my code. While it sure did feel nice to work with, I found it lacked some important functionalities, like ...
4
votes
2answers
71 views

Follow up Implementation on Monty Hall Simulation

I have taken your inputs on my original question and formed a new implementation of the Monty Hall Simulation: Again keep an eye on CleanCode and OOP The Price to be won: ...
3
votes
1answer
88 views

Clean Code / OOP on Monty Hall Simulation Implementation

can you review the this code for the Monty Hall simulation, mainly on the aspects of OOP and CleanCode ...
3
votes
1answer
62 views

Design of a Tic Tac Toe program in Python

Here is a program I wrote to reproduce the known win proportions for random Tic Tac Toe games (X always moving first). It takes about a minute to play the one million random games that will be played ...
1
vote
0answers
36 views

PHP project with Google Calendar API

I'm playing with a simple (for now) project in PHP with Google Calendar API. I have posted the code here in order to improve my programming style about whatever you think it's worth suggesting. Thank ...
2
votes
0answers
30 views

Simple Flappy Bird Clone using Kivy (with very minimum physics)

This is a very simple clone of Flappy Bird using Kivy, to be used for programming class for teens. The game consists of 3 classes: Bird, ...
1
vote
1answer
33 views

Gather list of all IDs ordered by submission date and ID by parsing file path

This code is to gather a sorted list of IDs (first by ID, then by date) recursively from a directory that submitted a particular type of file (that, as you can tell, includes the word "Magic") and ...
1
vote
1answer
33 views

Create an Array of Objects for Patch Notes in React

I was looking to get some reviews of my code, so I can improve my writing. Functionally it works the exact way I want it to based on my patch notes .md file. I'm open to all suggestions for improving ...
3
votes
1answer
40 views

Reproducing the known results for random tic tac toe play using Python

I'm reading "Code Complete" by McConnel and I'm practicing using object oriented programming to "reduce complexity". (By that McConnel means, among other things, that it should be very easy to read ...
3
votes
1answer
128 views

Bill settlement for multiple users

I want to improve the logic for bill settlement and calculation of amount due. I managed to write code with T.D.D., but I think those loops could be improved somehow. Do you have any ideas on that ...
3
votes
0answers
28 views

Generic router in Rust

I am trying to make a router in Rust using Rocket.rs. I'd like to devise a way to use a default router for my more simple db tables that don't require different logic, to prevent rewriting the same ...
1
vote
1answer
54 views

Creating objects from xml-data

I've got an XML file with some info about hosts connected to my home network and I would like to create objects containing that info in a neat way, so that I can make some nice front-end application ...
6
votes
1answer
85 views

First OOP in Python 3: Pygame Pong

I have been studying Python for a few months and just recently decided to stop avoiding OOP and reworked a Pong game to a more object oriented style. Please tell me how I should improve my code. Some ...
0
votes
1answer
46 views

Polymorphism and inheritance in C99

In the following code I have created the something like the behavior of inheritance and methods in C99 (without vtable). The code compiles without any warnings even with ...
7
votes
3answers
150 views

Standardized and automated Class block generation for VBA

I recently developed a tool which automaticaly generates VBA code in order to smoothly create class templates. I wanted to share this tool with the community, hopefully this is the right place. The ...
2
votes
1answer
59 views

Stopwatch utility class in Java

Looking for input on my code for a Stopwatch utility written in Java. ...
3
votes
1answer
358 views

Bowling scorecard app

This is one of my first attempts in writing a bowling scorecard app. It can have more than one player. I would like to know if anyone has suggestions to improve the code. I am trying to make it as ...
1
vote
2answers
76 views

Item class/system for RPG/DND type game

Thanks for the enormous response on my last question! I've returned with another question, hoping for more insight. I'm developing an Item class and system, and I ...
2
votes
0answers
39 views

Database code for Python-based URL shortener

I had implemented a URL shortener with Python and a database. Please review the database part of the code. The idea is to create an MD5 hash of the URL in question and then store it in a database. The ...
8
votes
3answers
793 views

Binary Search Tree implementation using smart pointers

I have implemented below code for binary search tree implementation using shared pointer. At present, I have considered only integers. It supports insertion and deletion of values. Also, a print ...
3
votes
2answers
39 views

Chip8 emulator memory map

I am making a Chip8 emulator and I started out with making a class for handling the memory map. So main the execution will read from this memory object and write to it. /include/Chip8.h ...
1
vote
3answers
65 views

Password generator class and CLI

I made a password generator class in C++. I am not as familiar with C++ as I am with C, so I am looking for ways to move to a C++ mindset. I am also trying to use embedded practices like avoiding ...
6
votes
2answers
160 views

Soccer field map creator

I am fairly new to OOP and am working on a little website project to practice. I wanted to post after getting the initial setup done in case I am making any major errors or not following best ...
1
vote
2answers
60 views

ORM class for Posts

I'm new to PHP OOP and I'm making some tests. I have 2 classes: database and posts and the two interact with each other. Class Database: ...
8
votes
2answers
445 views

Hunt the Wumpus game in C++

I have created a simple version of the classic game Hunt the Wumpus in C++. The rules for the game can be found on Code Golf SE. The rules of the game are (from PPCG): The player starts in a ...
2
votes
2answers
92 views

An account/banking system in C++

This is just a basic accounting/banking system with the user being able to register an account, check their balance, make a withdrawal and deposit money etc. There is a few things a staff account can ...
7
votes
1answer
3k views

Snake Game in C++ with OOP approach

I wrote a Snake Game in C++ and I have practiced some OOP approaches. I would really appreciate criticism and some advice. snakeGame.h ...
3
votes
2answers
302 views

Implementing different types of light sources in a Graphics project

Edit: I got asked a lot why I need to have the LightSource base class or why do I keep one vector of all the light sources, so here's my explanation: In many ...
2
votes
0answers
31 views

Python logging setup for a package

I'm running a package that downloads data from the internet. This package makes logging calls from different modules. Suppose I have a package 'demopackage'. Here is how my logging is currently set ...
1
vote
0answers
64 views

Image capture client - multi-threading + sharing data between services

I'm working on a small side project at the moment - like a homemade CCTV system. This part is my Python Capture Client - it uses OpenCV to capture frames from a connected webcam and sends the frames ...
1
vote
1answer
44 views

Basic playing card objects for games

I wrote classes to model a playing card, a deck, and a player to be used in multiple playing card games. I originally posted a Card class here, and now extended the ...
3
votes
0answers
44 views

Playing card object

I am writing this class to eventually create a playing card game (Spades) and also to utilize the object oriented paradigm. This was my attempt to model a card as an object. Each card has a suit and a ...
4
votes
1answer
48 views

Uploading songs from website to database and then to Spotify

My Python program parses songs from a website, corrects song titles and artists with the Last.fm API, searches for the spotify uri using the Spotify API, stores all the information in a SQLite ...
2
votes
0answers
62 views

Game tournament service - core logic for matchmaking and results

We have a little tournament in our company between coworkers and I decided to write an application for managing games, results and rankings of players and teams. The base logic for application is ...