Skip to main content

Questions tagged [class]

A template for declaring a type of object.

1 vote
3 answers
224 views

I am creating a cinema website focused on client services, where clients can reserve tickets for movies and browse the cinema's schedule (both daily and weekly). The schedules will be managed by an ...
Moncef Drew's user avatar
2 votes
3 answers
2k views

Straight to the point, here's the original code: integer = input(...) size = len(integer) # Created three dicts for matching numbers as keys to corresponding words dic_ones = {...} dic_tens = {...} ...
Programmerthinker007's user avatar
-2 votes
1 answer
330 views

Introduction Components are an important building block of software. In terms of software architecture, there are a lot of principles regarding components that should be adhered to (high cohesion, low ...
dn1h's user avatar
  • 19
0 votes
4 answers
500 views

Class and component dependency cycles Assume, we have component A with class CA, and component B with class CB, with a cyclic two-way dependency between classes CAand CB. Hence, we have a cyclic ...
dn1h's user avatar
  • 19
-2 votes
1 answer
533 views

Say I have a class with a function do_thing that is comprised of multiple steps, which themselves segregate into functions (first_process and second_process). At what point would this be considered ...
Tim Kirkwood's user avatar
1 vote
1 answer
150 views

Say we have the interface interface IColoredSquare { int GetSideLength(); void SetSideLength(int length); string GetColor(); } and I implement it like this class ColoredSquare : ...
user avatar
2 votes
1 answer
2k views

Python is the language I use most in this period. My background in Java Before start learning Python I have programmed in Java language. In Java all code is written inside the methods of a class and ...
User051209's user avatar
2 votes
3 answers
225 views

there are a vehicle class and customer class . In short, in the customer class there is a function that shows 'can this person or company rent that car'.The function uses a object of vehicle and ...
Tunahan's user avatar
  • 31
0 votes
5 answers
2k views

I have a base class "People" which two other classes inherit from: Employee and Student. The Student class includes a GPA (type double) and the Employee class does not. I have an ArrayList ...
Delta88's user avatar
  • 19
1 vote
2 answers
797 views

I have a specific domain entity that has a given type and some attributes. Based on the type, it can have another set of type-depending attributes. Normally, I would create a class for each type and ...
Fischer Ludrian's user avatar
2 votes
2 answers
157 views

For example, for base and child classes, if all child class need a class member, eg: baseHp, which represents the base hp to calculate the actual hp of monsters in a game: public class Monster{ ...
wcminipgasker2023's user avatar
0 votes
1 answer
194 views

While writing the constructor for class A in Python, I calculate some of the class's fields using function fun(). This function is never used outside the constructor of instances of this class. In ...
Harm van den Brand's user avatar
2 votes
3 answers
1k views

I went through various blogs but nowhere I can find the reason of having virtual constructors in C++. Why is virtual constructor needed and lets say if we go through the wrong way of creating virtual ...
H Kumar's user avatar
  • 31
1 vote
0 answers
100 views

Context I'm designing the software architecture of a safety critical software written in C, under DO-178C (DAL A) and with a Code Standard based on MISRA-C 2012, but no fully compliant. It is the ...
Sam's user avatar
  • 31
9 votes
4 answers
4k views

I am working on a huge code base (more than a million lines of code with a sophisticated architecture) written in C++ over the span of a couple of decades. The task on which I'm working at this point ...
Dude's user avatar
  • 209

15 30 50 per page
1
2 3 4 5
21