Z
Z
zahardzhan2018-08-11 11:01:49
Programming
zahardzhan, 2018-08-11 11:01:49

What is the name of the simplest class?

There is an object in the code, the only property of which is the duration of its existence. What is the name of the class of which this object is an instance? It is desirable to give an answer with justification - more detailed than one word.

Answer the question

In order to leave comments, you need to log in

10 answer(s)
O
Oleg Pogrebnyak, 2018-08-11
@S0HardCore

Lifetime, because it translates as "life span", as opposed to simple "duration" and "duration".

G
Griboks, 2018-08-11
@Griboks

You need to create the TimeObjectDLL library. Place the TimeObjects namespace in the library. There is one more thing inside - ConstructableObjects. Create a VariantObject class in the namespace. In this class, create another class, SingleConstructableObject. Inside create a CountableDuarationObject class. Add your Lifetime property to this class.
After compiling the library, you can create the necessary objects and access them as follows

new TimeObjects.ConstructableObjects.VariantObject.SingleConstructableObject.CountableDuarationObject().Lifetime=10

A
ApeCoder, 2018-08-11
@ApeCoder

And why is he needed? What problem does it solve? Measurement of time?

M
Maxim Timofeev, 2018-08-11
@webinar

There is an object in the code, the only property of which is the duration of its existence

humanity?
continuum - (lat. - continuous), the term used? mathematics, natural science and philosophy. In mathematics, K is understood as infinite sets that are quantitatively equivalent to the set of reals. numbers. The power, or cardinal number, of such sets, according to the hypothesis of the creator of set theory G. Kantor, directly follows the cardinal number of a countable set, that is, a set equivalent to the set of all natural numbers. P. Cohen (USA) managed to prove the independence of the continuum hypothesis from the other axioms of set theory, although the problem of establishing the truth or falsity of the hypothesis remains open. With a geometric interpretations are valid. numbers K. can be represented using points on the number line (or the x-axis). Since the set of all points of any segment of such a line is equivalent to the set of all reals. numbers, K.

V
Valery Glukhovtsev, 2018-08-12
@valera-glukhovtsev

Maybe just Timer? The meaning is suitable
Well, or even better Stopwatch (stopwatch) - just the only function - to measure the time from the moment of launch, in your case - creation

N
nikialeksey, 2018-08-12
@nikialeksey

You need to name classes based on their behavior, not their properties, because class properties are what you need to hide, encapsulation is such a word. So you need to explain the behavior of this object, tell roughly how other objects will interact with it.

A
Alexander Lebedev, 2018-08-12
@Petrolingus

Lifer - sentenced to life imprisonment. Its only property is "life span". You can also Selfdestructor (lit. self-destruct).

H
hokudjolsbsy, 2018-08-13
@hokudjolsbsy

duration, for example, if there was no such option already. And how do such tasks increase OOP skill?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question