Skip to main content

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.

Filter by
Sorted by
Tagged with
3 votes
1 answer
109 views

Tap-Type-Game in Python (fast-typer)

Hello everyone Last week I've started creating a little project for fun - TapType Game, I know there is a lot of things to make better, but what about my solution, can you give me some general tips, ...
KermitTheFrog's user avatar
1 vote
0 answers
263 views

Jetpack Compose: Items-list with Item-Details-view

The app is based upon an exercise from a Udemy-course. The purpose is to become familiar with LazyColumns. I've enhanced the exercise with a Details-view and a navigation between LazyColumn and ...
michael.zech's user avatar
  • 4,358
2 votes
1 answer
181 views

Beginner Python Web scraping

I'm a newbie in programming, I chose Python. I'm learning on my own. Currently I'm preparing code for a portfolio on github. I will be grateful for any code review, especially in the subject of OOP: ...
Magda's user avatar
  • 29
1 vote
1 answer
145 views

Interconnect Recipe and Notes

I'm currently working through a tutorial. The project is a recipe website. One of the lessons to "save some lines of code" and use bidirectional setters for bidirectional relations of ...
Benjamin Basmaci's user avatar
1 vote
1 answer
126 views

Transform an array into object and set index for an unique key in javascript

I have a method that merges keys and indexes from an array into an object. I'm stuck with ways to compress this method, and I don't know what I can do to make it simpler. Goal get an array of objects ...
wittgenstein's user avatar
4 votes
1 answer
210 views

Simple console menu backend with calculator implementation in Python

I've written a simple calculator in Python. I want to show not much effect of the action but the logic behind it, by that I mean console menu implementation in the ...
whiteman808's user avatar
4 votes
1 answer
395 views

Abstract base class for binary serialization

Ensuring that some logic is always being run before the user's overriding methods. I'm writing a library and I have some abstract classes that can be binary serialized (and users can subclass them and ...
Saturn's user avatar
  • 409
0 votes
2 answers
422 views

OOP Tic Tac Toe Game

I have built a project OOP Tic Tac Toe. I am beginner-intermediate developer. Can you tell me what I can improve, what I did wrong and what to look up to? This is my first OOP project. I'm happy that ...
mcccuklev's user avatar
  • 139
3 votes
1 answer
113 views

Voting application - OOP

I am developing an API and I have some questions about variables from another class. Here is an example (reduced code to be more assertive): File user.py ...
Arcyde's user avatar
  • 33
5 votes
2 answers
347 views

Tiny Network Web Framework / Library in C++

I recently wrote a tiny network library in C++17 called Turtle on Linux and wish to seek some improvement advice on how to further develop it. Any insights would be appreciated. Origin: As a student, ...
I Love Turtle's user avatar
1 vote
1 answer
194 views

CRUD for array of Objects

I'm trying a simple exercise where I want to Generate Solar Systems, and store them on an array for ease of iteration and accessability. I've create the following classes: ...
Tiago Matos's user avatar
2 votes
0 answers
380 views

How to make a console menu

Showable ...
bebraed's user avatar
  • 63
-1 votes
1 answer
58 views

Replacing private helper methods with global functions in Python? [closed]

In Python there is no real notion of private access. It's merely suggested by social convention with _ prepended in method names. ...
Michael Moreno's user avatar
5 votes
1 answer
419 views

Simple Ellipse Collision Mini Game

I am doing an exercise to help me understand C#and OOP. The exercise is supposed to teach me about ...
Darke's user avatar
  • 163
4 votes
1 answer
169 views

Hospital appointments registry

...
bebraed's user avatar
  • 63
2 votes
0 answers
67 views

A Haskell-style "maybe" type in Python, version 2

I have decided on a preferred solution to my question A maybe type in Python. Which implementation is best?, and have expanded it to be more ergonomic. I have implemented a host of utility functions (...
schuelermine's user avatar
5 votes
3 answers
1k views

Simple N Puzzle console game

I am completely new to object oriented programing (OOP). I have also never worked with C# before. The exercise from my book had some requirements that should be ...
Darke's user avatar
  • 163
1 vote
1 answer
198 views

Terminal War Game

First I would like to thank everyone for whatever help you may offer me. In full disclosure this is a project for a bootcamp class I have. My problem is, and I've asked them about this, that they aren'...
Infinite Grasp's user avatar
1 vote
0 answers
41 views

Frontend to handle course planning and administration [closed]

I read up on and dived into the Repository pattern for a project I am working on. I have understood that the repository abstracts the actual access to any form of storage for my data model. What I was ...
lhiapgpeonk's user avatar
3 votes
1 answer
449 views

Yet another sparse set implementation

I got inspired by this blog post and implemented a fixed-size sparse set, removing the need for vectors, because the sparse set's size equals at least ...
Tab's user avatar
  • 33
1 vote
0 answers
69 views

Check that inputs are valid dates

I have a method in a class that accepts either a datetime or string parameter. It is shown in the last code block (I didn't include the class). A little background is that I am defining a wrapper ...
Travis DePriest's user avatar
3 votes
2 answers
522 views

2D Matrix in C++

I wanted to play with a two-dimensional generic data container in C++ and explore different methods of traversals: using closures and iterators. I'd like a review of it. ...
nowox's user avatar
  • 1,099
1 vote
1 answer
653 views

TKinter using OOP approach

I'm starting to build an application for automated network troubleshooting. It's going without any issues so far. I'm using an OOP approach @ which i create the widgets in the init method. what's ...
homunculus's user avatar
1 vote
1 answer
1k views

How to transform the CompletableFuture response

Context: I have a client app which consumes an API. I want to call this API is async way (using java.net.http.HttpClient) and once I receive this data then I want ...
Learner's user avatar
  • 11
0 votes
1 answer
214 views

Company/Employee Model

I have the following employee/company system with dataclasses Employee and Company. There is also a ...
Illusioner_'s user avatar
1 vote
1 answer
176 views

Implementation of the driver for the speed sensor

I have been developing a C++ driver for the incremental rotary encoder (irc) based speed sensor. It is a part of my embedded software project. The driver is basically decomposed into two layers: The ...
L3sek's user avatar
  • 395
0 votes
1 answer
449 views

Class that counts its instances

I'd love some feedback on the C++ base class shown below. It's basically a toy problem for a fake video game where the monsters that you have to avoid will all be sub-classed from the class shown ...
tarstevs's user avatar
9 votes
1 answer
2k views

Object-oriented programming for tic-tac-toe (only 66 lines) in Python

I am looking for criticism or direction for simplifying this game. I plan to build a player class and Parent that into a terminal player and a my first machine learning minimax algorithm. For that ...
Infinite Grasp's user avatar
3 votes
1 answer
71 views

I made a webpage that simulates sharks eating fish in the torrid world of Wa-tor

I've been self-studying HTML/CSS/JS. I read about Wa-tor. It's a population dynamics simulation which simulates fish and sharks breeding and predating. This seemed cool so I decided to implement it....
Jeff's user avatar
  • 33
5 votes
1 answer
249 views

Object-oriented elevator scheduler

The elevator system has the following functions: There is one building, and the number of elevators can be set arbitrarily. Requests can be sent from outside the elevators, in this case the request ...
Hangji He's user avatar
0 votes
2 answers
83 views

Object Oriented Hangman in Python Version 2.0

I am looking for as much criticism as possible. Specifically I am trying to institute BEST PRACTICES for OOP and game design. Enjoy! Github hangman repository Each Class is in a separate file and ...
Infinite Grasp's user avatar
2 votes
2 answers
57 views

Object Oriented Hangman in Python (version 1.0)

As always, I am looking for as much criticism as possible. Forums and exchanges like this are where I have received my most solid feedback. Enjoy! Github hangman repository The code that I import is ...
Infinite Grasp's user avatar
2 votes
1 answer
86 views

Database buffer class

I designed the following DataBaseBuffer class, to be used by different threads that generate queries and need to send them to the database. It was inspired by ...
Reda's user avatar
  • 23
3 votes
2 answers
269 views

A simple console-based banking system

I am an amateur. I have been coding for 3 months now. If you have any comments,suggestion or critics about my code please feel free to speak up(i am urging you to). I want to be a really good ...
THE BLACKSMITH's user avatar
2 votes
1 answer
107 views

Simple BlackJack Card Game - First OOP Code

Blackjack card game with hit and stand. Wasn't allowed to use functions outside of classes in code. Had some difficulty with __str__ dunder method on Dealer and ...
Beginner's user avatar
  • 189
2 votes
1 answer
344 views

Pong in c++ console app

I would really appriciate if someone could review my code and give me feedback. This was my first multi file project. Main: ...
Ivica's user avatar
  • 75
1 vote
2 answers
105 views

Object-Oriented Blackjack V2

[Edited] formatting and Flake8 linter corrections Four days ago I posted my first object oriented programming project. Everything I have learned to date is self-taught and posting project to receive ...
Infinite Grasp's user avatar
4 votes
1 answer
186 views

GUI tower defense: path and enemies

Working on creating new tower defense in JS. May be port to React. How to improve? Only made enemies and path so far. In below demo, path is white background and enemy is red circles and green squares....
lizduadac's user avatar
  • 111
1 vote
0 answers
35 views

How do you decide if a function should return data directly (via return statement) or indirectly (e.g. updating a class property) or both? [closed]

I have some functions which update records in some database tables. When I run each function I want to know the number of records affected by each. I'm wondering what the most elegant way of returning ...
WackGet's user avatar
  • 119
6 votes
4 answers
278 views

Object-Oriented Blackjack

[Edited: added V2 link] BlackJack V2 - Github This is my first post, and I was actually going to post this on Stackoverflow when I was rather suggested posting the code here, as it may be better ...
Infinite Grasp's user avatar
2 votes
1 answer
170 views

Creating object in JS that is passed into IHttpHandler

I am working on a web page where I am creating a JS object using {} and []. This object is passed into a handler I wanted to ...
Jefferson's user avatar
  • 353
2 votes
0 answers
76 views

Vectors in 2D, 3D, and more dimensions

I have written this code to perform vector operations like addition, multiplications and so on. I was wondering if there is a better way to write this code? Because I feel it is a little bit repeated. ...
Chandler Bong's user avatar
5 votes
1 answer
173 views

Rock, Paper, Scissors game in object-oriented Python

I would like to learn Python and (maybe...) someday become a developer. Nevertheless... I've written a small "Rock, Paper, Scissors" game. Can you please take a look at the code and write ...
Mariusz Wiśniewski's user avatar
2 votes
1 answer
376 views

Generating random number of randomly sized Squares/Rectangles using numpy arrays

I made classes to use in generating square/rectangular shapes on a texture. ...
Nyos's user avatar
  • 21
2 votes
1 answer
113 views

Linked List implemented in C++

I have a linked list code in C++: ...
narocac's user avatar
  • 65
1 vote
1 answer
1k views

Library system in Java with OOP

I am practicing designing OOP projects. And this is my first OOP design. I need some reviews for the code and the design please. Here is what they call UML. The code. ...
Omar_Hafez's user avatar
3 votes
1 answer
106 views

Segmentation of list to minimize the largest sum

I have written the following code for diving a list 'seq' into 'k' segments such that the maximum sum of each segment is minimized. I have used dynamic programming to solve this problem. But my class &...
Jahid Chowdhury Choton's user avatar
2 votes
1 answer
78 views

ArrayPractice with shifting arrays, generate new arrays populated with even numbers, and more

This is from my second homework assignment in my Data Structures class (in which we use Java), we were simply given the task of filling out the functions shown below (they were empty before) and I was ...
Jackson Kirkpatrick's user avatar
0 votes
1 answer
85 views

Simplify creating result objects from two Map<Boolean, List<Map<String, Object>>

I currently have 2 Maps intersectionDiffLeft, intersectionDiffRight with the structure of Map<Boolean, List<Map<String, Object>> Where if the boolean ...
Beez's user avatar
  • 101
1 vote
0 answers
184 views

pygame with infinitely scrolling background - handling of sprites movement

In my current project I try to implement the basic game logic of the game "Vampire Survival" (Little impression of the first level can be seen in this video on Youtube). Question I want to ...
Rabinzel's user avatar
  • 111

1 2
3
4 5
76