Skip to main content

All Questions

2 votes
0 answers
71 views

Classes for Config and logical operators

I have a spring cloud gateway application with this yml structure for request validation: ...
Q2Dev's user avatar
  • 21
1 vote
1 answer
72 views

Python 3.10+: an exploration of meta classes and subclasses through the lens of metric (SI) prefixes with subclass-able units and changeable bases

Problem Statement From the National Institute of Standards and Technology's Office of Weights and Measures, one can find a handy list of all the metric prefixes: e.g. Purpose Name Symbol Factor Name ...
SumNeuron's user avatar
  • 281
0 votes
1 answer
247 views

Calling the base method from overriden method to add some functionality

I have a small Linked list program which I created for just brushing up the concepts. Following is my Node class ...
Jyothish Bhaskaran's user avatar
4 votes
1 answer
411 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
1 answer
483 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
1 vote
0 answers
61 views

How was this python code analyze these classes with class diagram

Anyone please review my code and give some improvement suggestions. I wrote code but not to the best standards. I think this site give some valuable suggestions this code is for extracting xlsx or csv ...
Mohanraj M's user avatar
1 vote
1 answer
482 views

Model animals using inheritance in Java

I was assigned the following problem: You've gone back in time to 500BC Athens and Socrates wants you to build him an app to help classify animals. Build the classes ...
apex2022's user avatar
  • 161
-1 votes
2 answers
88 views

Simple Vehicle speed representation [closed]

This code models two vehicle types, with a method to accept a string representing a boost to change speed. How can I optimize performance in inheritance child class? How can I reduce the code inside ...
manas's user avatar
  • 9
1 vote
1 answer
2k views

C# Coffee Machine

I saw this post and tried to do my attempt. This is the requirement of task: Design a coffee machine which makes different beverages based on set ingredients. The initialization of the recipes for ...
Learner's user avatar
  • 143
3 votes
2 answers
460 views

Alarm clock subclass of a clock

I have these two classes and they should remain separate classes, but I have a feeling that this could be implemented more efficiently and with less duplicate code. After googling around I still didn'...
LostHat's user avatar
  • 33
2 votes
0 answers
95 views

what should be the best approach to follow DRY principle here

My first component ...
Dewanshu's user avatar
  • 129
2 votes
3 answers
309 views

Builiding a Model from Stored Procedures

After reading that Data Classes can be considered a code smell, I am shifting from a pattern with many data classes and a single manager class that handles all the instantiation of the classes, to a ...
user avatar
2 votes
1 answer
168 views

Noughts & Crosses (Final Version)

I've made a major update to my Noughts & Crosses program, this ISN'T a duplicate! I know it's not good to use system("pause") and system("cls"), however, I just wanted to make ...
George Austin Bradley's user avatar
4 votes
2 answers
385 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 ...
tommy99's user avatar
  • 103
4 votes
1 answer
3k views

OpenGL Mesh Class

I've written a simple mesh class. The purpose of it is to build a mesh, draw it to the screen, and provide some means by which the mesh can be transformed/scaled, etc. This was done with GLAD, GLFW, ...
Featherball's user avatar

15 30 50 per page
1
2 3 4 5
7