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
-5 votes
0 answers
84 views

After another second thought from the second thoughts series Object oriented programming deque implementation (after second thought) it turns out using static methods alternatively to method ...
user294861's user avatar
0 votes
0 answers
61 views

I am creating a program to create digital twins of enterprises. I am using the Simpy framework for this purpose. I'm creating a universal system that can model almost any enterprise, but I have a ...
Андрей Александров's user avatar
-1 votes
2 answers
186 views

Another second thought from the second thoughts series Object oriented programming deque implementation (after second thought) led to disposing if statements ...
user294861's user avatar
-7 votes
1 answer
128 views

The java.util.Deque implementation from Object oriented programming deque implementation that consists of three elements linked arrays, each array holding reference ...
user avatar
2 votes
2 answers
113 views

I'm calculating the injectors, and I've added the complete calculation code and tested it using pytest. Can you suggest a better way to structure the code so that I ...
Андрей Александров's user avatar
4 votes
1 answer
368 views

I wanted to check my system design and/or object oriented design skills. I started with this Tic Tac Toe WinForms Desktop program. The user couldn't input characters other than O , X . Both players of ...
Siva Sankaran's user avatar
-4 votes
1 answer
113 views

Implementation of java.util.Deque interface based on string of POJOs, that is plain old java object, encapsulating a field for holding reference to each object ...
user avatar
6 votes
5 answers
710 views

This is code for a basic word search puzzle generator (also "wordsearch"). The code: Creates a 10 x 10 grid of letters. Words are hidden somewhere in the grid, horizontally or vertically. ...
toolic's user avatar
  • 16.4k
7 votes
1 answer
134 views

I'm making a game with a system inspired by the PSP Game Dungeon Dungeon maker 2 the hidden war: Visual Reference. I have everything set up but I feel there are ways to make the code more simple and ...
Jereco Merash's user avatar
4 votes
5 answers
773 views

First the PasswordStore, which is pretty straight-forward. It stores title-password association, but it is important that a title can have multiple passwords. The <...
viuser's user avatar
  • 629
2 votes
1 answer
89 views

I'm new to Lua and thought a decent way of familiarizing myself with the language would be to implement some basic utility functionality around status codes. In particular I've reimplemented a subset ...
zziccardi's user avatar
8 votes
2 answers
1k views

I am currently learning object oriented programming in Python. I attempted writing an OOP program for hangman, and while the program is functional, I just ended up writing a very long class method. ...
user30970420's user avatar
5 votes
1 answer
252 views

I’m practicing the Single-Responsibility principle with a small project. A Report is composed of ...
sam's user avatar
  • 503
2 votes
1 answer
148 views

I have written a code that deals with ABC/XYZ analysis. I want to use it in my application and would like to find out how the code can be improved, its readability and it will be better to implement ...
dynamic.aerospace.inc's user avatar
-1 votes
1 answer
117 views

I have a very class heavy approach to writing C++ code, which I don't think is necessarily wrong. However, I often use classes without knowing if I actually need them, which I feel leads to making ...
user290523's user avatar
8 votes
2 answers
998 views

I am following the book crafting interpreters by Robert Nystrom using C++. In the book we use an Expr base class to describe expressions in the language lox. ...
Featherball's user avatar
6 votes
3 answers
568 views

I wrote a menu user interface in C++. What do you think about my code? What can I improve? Am I missing some better practices? main.cpp ...
whiteman808's user avatar
0 votes
3 answers
238 views

I’m working with custom exceptions in Java for stack operations. However, I’m unsure if the exception handling is being handled properly, especially in terms of how exceptions are thrown and caught. ...
Somesh's user avatar
  • 11
0 votes
1 answer
78 views

Bulk conditions evaluation throwing a single exception of a configurable type for all unfulfilled conditions. It is developed around several design patterns: (1) fluent interface to configure the ...
user avatar
7 votes
1 answer
915 views

I know there are several implementation of FSM in C++ containing different set of features and written in different styles. Nevertheless, I've decided to write my own. Here are some key points : c++...
LRDPRDX's user avatar
  • 941
11 votes
3 answers
2k views

This is my C++ implementation of Computing π(x): the combinatorial method by Tomás Oliveira e Silva. The math involved is elementary number theory, but fiddly and not the focus here. I have ...
qwr's user avatar
  • 1,233
6 votes
2 answers
505 views

I am building a Calculator in C++ OOP style. I made 3 Classes: UserInterface, which is responsible for Input and Output of the User. Calculation, which is responsible for the logic of the Calculator. ...
Anon26's user avatar
  • 61
3 votes
1 answer
240 views

(Game: ATM machine) Use the Account class created in Programming Exercise 9.7 to simulate an ATM machine. Create ten accounts in an array with id 0, 1, . . . , 9, and initial balance $100. The system ...
Team B.I's user avatar
  • 163
6 votes
2 answers
132 views

I have created a vector ADT, and this is a brief code for all of you. I will further add some more methods in it. Kindly review my below code: ...
user288615's user avatar
8 votes
4 answers
1k views

...
LMays's user avatar
  • 341
7 votes
3 answers
501 views

Requirements: Add/Delete member. Add/Delete book. Issue/Return book. Review Request: General coding comments, bad practices, style et cetera. Code: Main.java: <...
Haider Ali's user avatar
4 votes
2 answers
217 views

Loosely inspired by Ruby's String.count-method I wrote a similar Swift-method myself as an extension to the String-class. Then I had the idea to use a second parameter with which you can control if ...
michael.zech's user avatar
  • 5,042
3 votes
1 answer
120 views

What it does The code starts with a set of integer intervals, and can add new intervals (possibly by updating existing intervals). Essentially, it is a bit array whose index starts at ...
FromTheStackAndBack's user avatar
3 votes
2 answers
181 views

I have started my first foray into object oriented programming and I wanted to find out if what I have done here makes sense: Pokedex.cs ...
HLT's user avatar
  • 133
3 votes
1 answer
169 views

This is an improved code version for Amount Transfer Between Different Accounts Welcoming any further improvements for this. ...
Jill's user avatar
  • 277
4 votes
1 answer
126 views

The util class to find all the indexes on an element into a Collection supports forward and reverse lookup starting from a given index along with changing the ...
user avatar
4 votes
1 answer
268 views

I implemented the below classes for transfer amount between different accounts. Used ConcurrentHashMap and Stamped Lock to handle concurrency. Am I missing any important concepts here? Are there any ...
Jill's user avatar
  • 277
7 votes
4 answers
2k views

This is my first time writing something bigger with OOP. A simplified version of the card game BlackJack. Hand splitting currently isn't implemented. File tree ...
dheb's user avatar
  • 83
5 votes
2 answers
960 views

I implemented the below URL Shortener class. Used ConcurrentHashMap to handle concurrency. Short URL building logic may not be optimal, but it ensures that only ...
Jill's user avatar
  • 277
4 votes
1 answer
156 views

I've been into computer science fundamentals (proper data structures/algorithms/etc) including Object Oriented Programming. Therefore, I decided to reformat my old traditional Python Calculator into ...
Raphael Irvin's user avatar
2 votes
1 answer
96 views

I am writing a program for calculating rocket engines and for its operation I store all the settings in files with the extension .yaml . To do this, I wrote this code and I want to get feedback and ...
alexandrov's user avatar
6 votes
4 answers
218 views

I have just gotten into Object Oriented Programming and I've been practicing it through Python. But I think I still haven't clearly grasped how it should be used effectively. I've created a game Using ...
Raphael Irvin's user avatar
2 votes
0 answers
311 views

Update I have released a prototype (v0.1.0) of my SOb project, which is a generalized framework for easily simulating objects. Background I am writing a VBA module ...
Greg's user avatar
  • 569
-2 votes
1 answer
116 views

I've an object that looks like this, and users have been populating the attributes post-initialization, e.g. ...
alvas's user avatar
  • 709
6 votes
2 answers
725 views

I have this code which sets values in a location class from values from JSON data. ...
Asher Ross's user avatar
1 vote
1 answer
301 views

This is a simple implementation of a rules engine. I am really hating the very long MATCH/CASE function. I am wondering what kind of Design Patterns could be used there to make this code more ...
user avatar
4 votes
3 answers
371 views

There is this code in which the calculation of the centrifugal nozzle of a liquid rocket engine is performed. All basic calculations take place in the Injector ...
DYNAMIC AEROSPACE's user avatar
2 votes
1 answer
118 views

The following implements a relatively generic and modular data loading utility. It loads images from a local storage given a lookup table. The data loader is parametrized via dependency injection to ...
lo tolmencre's user avatar
7 votes
2 answers
657 views

In this project, I've developed an Advanced Grade Calculator that not only calculates the average grade but also accounts for credit hours and predicts future performance based on historical grade ...
Shamp Phili's user avatar
2 votes
0 answers
80 views

I have a spring cloud gateway application with this yml structure for request validation: ...
Q2Dev's user avatar
  • 21
5 votes
2 answers
440 views

I'm writing poker for my bot in discord. So far I'm presenting an incomplete version of the project, which is only a betting system. The development took a lot of time, so I decided to ask for help. ...
Cat met's user avatar
  • 53
3 votes
2 answers
208 views

I began creating blackjack in python; however, I'm looking to simulate it, so I'm thinking I'm going to need to optimize it so that I don't just leave my computer running for three hours waiting for ...
Joseph Beegle's user avatar
3 votes
2 answers
324 views

I wrote a module that I intend to use in my next tic-tac-toe project. All it is is a class that stores the boardstate along with some methods/properties. The biggest thing is the minimax alg. As shown ...
flakpm's user avatar
  • 77
7 votes
3 answers
1k views

I'm not very confident about this piece of code I created, it basically takes a file like this: ## # ## ## # #B # # # ## ## ## A###### Then proceeds to ...
José Gomes's user avatar
4 votes
2 answers
370 views

I have implemented a class in Python using Matplotlib for visualizing multiple subplots along with navigation buttons to move between different subsets of data. Each subplot displays a contour plot ...
Cold Fire's user avatar

1
2 3 4 5
76