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
-2
votes
0answers
11 views

A Sequence UML for User Login, is this valid?

I'm trying to create a sequence diagram, before I write the code, I came up with the following first diagram for a simple login case, does this look valid? You can edit and view the diagram here: ...
3
votes
0answers
34 views

HTTP Client Skeleton [closed]

I've made a simple winhttp client in C++ and here is kind've the skeleton of the header file. I was thinking of initializing the session once and then using it throughout the rest of my http client ...
2
votes
0answers
31 views

OOP: The correct use of classes and optimizing code

I am trying to improved my coding skills. I mainly work in web development. I had a "system" that I use in all my projects to fetch data from my DB to the browser. I tried an implementation ...
1
vote
0answers
24 views

Simple Sqlite-driven WinForms app in C# 7.0 - database interaction code

Description This is a simple "demo" app designed to help gain familiarity with interacting with an Sqlite database from C#, particularly storing images as blobs. The database has a single ...
6
votes
1answer
1k views

Football Management Program (AMERICAN) C++

I have recently finished my first real C++ program. It is text based, but hey, what d'ya expect out of a student? So, I would like person(s) to review the code I have written. It ain't short, but I ...
7
votes
2answers
201 views

Animal Storage TreeView - Tkinter

Bit of a pointless program (at the moment). It's intended more as practice for myself rather than anything else. General idea is that you add details of a particular cat or dog, and it'll update a ...
11
votes
3answers
1k views

Event tracking system

I am learning C++ programming and just learned about basic OOP and decided to create a simple project to test my understanding and practice what I've learned. The idea I came up with is an event ...
4
votes
3answers
113 views

Bank Card Generator Code

This program is used to create a random bank card number. Card number is created using account type and client location for the first eight digits and the remaining 8 digits are completely random. I'm ...
5
votes
1answer
151 views

Simple bank-atm system design OOP

For practicing designing systems I created a simple bank ATM system. I didn't want to make it to complicated so I left out things like cash bin per ATM and opening cash trays, etc. I also wanted to ...
12
votes
2answers
181 views

A Flappy bird Game

Here is a project that I have been working on for the past few days. I have used the SFML library in C++ to make a flappy bird game of my own. I made this as a ...
5
votes
1answer
45 views

Templated Fraction Class and programming design

Story I was trying to solve a hard problem from Project Euler earlier today (continued from yesterday) and I wanted to graph some things up and play a little bit with fractions. To work with fractions,...
5
votes
2answers
80 views

Object Oriented Library Management System

Library management system is a object oriented program that takes care of the basic housekeeping of a library. This is the third part of a series. The first iteration of the project is found here and ...
2
votes
2answers
79 views

Library Management System OOP with c++( Part2 of a series )

I don't know if this is acceptable, but I would love to thank the community for their advice concerning my previous post on this project This is a beginner's project. Library management system aims to ...
4
votes
1answer
52 views

Snake and ladder problem oops application

I am learning and trying to implement the best practice for snake and ladder game. Rules of the game The board will have 100 cells numbered from 1 to 100. The game will have a six sided dice numbered ...
1
vote
1answer
87 views

Library Management System with OOP [closed]

I am creating a library management system. Presently am done creating the Book and BookItem class. Can you point any thing you feel isn't necessary, inefficient or a general bad practice so I could ...
-1
votes
1answer
61 views

C++ main architecture [closed]

I'm working on a file interpreter and this is the code I have in my main() function right now: ...
6
votes
3answers
115 views

Generic Two Dimensional Data Plane with Manipulation Methods For C#

I know that there is a generic data structure System.Array could be used to create customized type array. I want to focus on the two dimensional data structure that ...
3
votes
2answers
71 views

Leetcode 1603. Design Parking System

Description of the problem: Design a parking system for a parking lot. The parking lot has three kinds of parking spaces: big, medium, and small, with a fixed number of slots for each size. Implement ...
4
votes
2answers
95 views

Beginner - OOP Project - Airline reservation system

Hi I just finished a VERY Basic airline reservation system. Wanted some feedback please let me know what you all think, if I am obfuscating information or passing parameters where I shouldn't or if ...
4
votes
2answers
310 views

web scraper for emails and links

I created a class to scrape URLS, parse and validate emails and get internal links. How can I achieve the SOLID principles in this class written in Javascript to make a web scraper? ...
1
vote
1answer
34 views

“Pick up” images when tapped on and keep track of it

Trying to get my first job as a developer I made an app I was extremely proud of: https://github.com/AnatolyRudenko/Crystals.Dragons The game starts in a random room of a random maze. Some prebuilt ...
3
votes
1answer
50 views

refactor python strategy pattern to use abstract base class

I came across this strategy pattern implementation https://github.com/jtortorelli/head-first-design-patterns-python/blob/master/src/python/chapter_1/adventure_game.py ...
9
votes
1answer
89 views

Audio visualizer in C++

I have completed my first attempt of a simple music visualizer app for windows in C++ using SDL. It takes system audio and outputs the soundwave in real-time. I'd appreciate some feedback on how I can ...
1
vote
1answer
45 views

Soduku Generator and Solver

This is my approach on creating a sudoku generator and solver with backtracking. Is right for sudoku generator to inherit from soduku solver? What is your general overview on the class structure, data ...
0
votes
1answer
72 views

Microservice in Springboot

I wrote two microservices in Springboot and tried to follow the best practices. I would appreciate any suggestions about any improvement that I can make on the whole codebase. What are the parts of ...
4
votes
0answers
61 views

Python tkinter placeholder class

I made a placeholder for entry widgets from tkinter, so I was wondering how good it is. I just started learning Python a bit before, so please do correct me if I'm wrong or if O missed something, or ...
2
votes
1answer
70 views

To Do List Project - app lets you make projects and inside of this projects you can save to-dos

I have built a To Do App in Javascript, using Webpack and some modules. The app lets you store projects (School, Sport, Grocery, etc.)... And inside these projects, you can store todo items... You can ...
2
votes
2answers
68 views

created a sql helper class using c#

...
8
votes
1answer
153 views

C# Profile Scraper

I'm a 16-year-old so I never studied programming, although I do try to adopt the best practices I can when given the chance. I would like to clean up the code posted below by making it comply with ...
2
votes
2answers
78 views

Designing object oriented clean code structure with spring services

I'm writing spring app for storing and manipulating recipes. I wrote ShoppingList service which generates, based on UUIDs of recipes, shopping list. This is my current model for which i wrote tests ...
1
vote
2answers
41 views

How to deal with nested objects which might be string or undefined in a clean way?

So I'm parsing an object using Typescript. I am pushing a value from within the object into an array of strings. Here's the code: ...
4
votes
2answers
148 views

JavaScript implementation of Symbol Table (Dictionary)

I'm currently going over Robert Sedgewick Algorithms book. Here I'm implementing a Symbol Table using a Linked List. The Sequential Search Symbol table is implemented in JavaScript. The book mentiones ...
1
vote
0answers
36 views

Instantiation logic within a specific object vs factory object

I want to program file lines transformation in a game initialization context and I am asking about best OOP practice. I have a MockConfigFile that implements a <...
2
votes
1answer
31 views

Modify parameter data before creating an instance of a class in PHP

I have an abstract Badge class, every class extending this class should always correctly set the incoming name (string) and achievedAt (date) fields. There might be other classes that extend the Badge ...
25
votes
1answer
2k views

A Pong Game using C++

I wrote a simple, 2-player Pong game for a Udacity Nanodegree in C++. The program has the following class structure (relatively new to UML so any tips on here would be very much welcome too): ...
4
votes
1answer
85 views

Simple Pizza Ordering Application in Java

I was inspired by a previous post here that also wrote a pizza ordering application. This is the attempt I have made using OOP in mind as I thought that would be just the way to go. Here is Pizza.java ...
5
votes
3answers
109 views

Implementing a quiz application in C# (object-oriented)

I posted a recent question on code review detailing my previous C# object-oriented application which used animals as the main context. Although this example doesn't really include inheritance or ...
4
votes
2answers
100 views

Animal, Dog, and IDangerous - Using interfaces and inheritance with C#

I'm quite new to object-oriented C#. I wanted to test my knowledge by creating a Dog/Animal classes. I also tried to implement ...
2
votes
1answer
51 views

Data-type implementation for multiple dynamic histograms

This is almost exercise 3.2.14. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne (since I am self-studying, I changed it a little bit): Develop a version of ...
1
vote
1answer
43 views

Simplifying data-type implementation for axis-aligned rectangles using data-type implementation for closed intervals

This is exercise 3.2.8. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Write a data type Interval that implements the ...
6
votes
3answers
161 views

Data-type implementation for rational numbers

This is exercise 3.2.7. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Implement a data type for rational numbers that supports addition, subtraction, ...
4
votes
1answer
79 views

React hooks update array of object

I have declared a react hook which will contain an array of object as follows: const [rowDataTracker, setRowDataTracker] = useState([]); Now I need to update the ...
8
votes
1answer
148 views

Data-type implementation for axis-aligned rectangles

This is exercise 3.2.1. from the book Computer Science An Interdisciplinary Approach by Sedgewick & Wayne: Consider the following data-type implementation for axis-aligned rectangles, which ...
4
votes
1answer
36 views

MultiLingual Online Translator

So i made a program, which allows you to translate from one language to another using the command prompt. I would like advice about the design, optimizations, and the tips and tricks to avoid ...
2
votes
1answer
66 views

Defining a finite set of instances of a class to check against [closed]

I have a Type class that will have many instances. I get the instances from a web service. The Type class has a ...
2
votes
1answer
50 views

Poor man's “about::tracing” for llbuild build time summary in JSON file

I used llbuild ninja build --profile PATH to create a JSON file of build summary in the following format: ...
6
votes
1answer
389 views

Python 3 Curses Terminal Tetris

I've been learning programming own my for a couple of years mainly using python, and I've created a tetris-like command line game using Python's Curses library. The game seems to function as intended; ...
10
votes
0answers
163 views

Host-Agnostic Model-View-ViewModel Infrastructure

I've written an API that unlocks some serious MVVM capabilities with VBA's MSForms UI framework. This is the complete code-behind for an example ...
5
votes
0answers
43 views

Sequence and Series Calculator

The Sequences & Series involved are Arithmetic and Geometric. stores and allows you to calculate using these given formulas and import fractions into micropython Support for micropython! ...
2
votes
2answers
90 views

Loan application service based on user credit score

The following microservice is just handling loan application and response the result of the application is accepted or rejected. It is part of my assignment for an interview. The project description ...

1
2 3 4 5
69