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.

8 votes
2 answers
946 views

A tree of polymorphic types (Crafting Interpreters Book)

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
517 views

Menu user interface class in C++

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
172 views

Java exceptions that show the message when converted to String

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 Diwan's user avatar
0 votes
1 answer
61 views

Bulk conditions evaluation throwing a single RuntimeException exception

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
858 views

Yet another finite state machine in C++

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
  • 921
3 votes
0 answers
79 views

Upload Data Products to OpenMetadata

I need to build a python application to interact with the OpenMetadata API (specifically, to upload a data in YAML format). However, I’ve encountered some intrinsic connections between the ...
user288833's user avatar
10 votes
3 answers
1k views

Computing π(x): the combinatorial method

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,201
7 votes
2 answers
445 views

OOP Calculator Program

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
  • 71
3 votes
1 answer
215 views

Simulate an Automated Teller Machine (ATM)

(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
  • 173
7 votes
2 answers
112 views

ADT vector in C++

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
7 votes
4 answers
969 views

Creates class and makes animals, then print bios

...
LMays's user avatar
  • 335
6 votes
3 answers
469 views

First Java Program: A Basic GUI Library Management System with JavaFX

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
175 views

Swift String-extension 'countOccurrencesOfChar'

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
  • 4,814
3 votes
1 answer
91 views

Merge discrete integer intervals

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
4 votes
2 answers
157 views

Object Oriented WinForm App

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
  • 143

15 30 50 per page
1
2 3 4 5
251