Computers and Technology
24.08.2021 08:33
229
364
7
Solved by an expert

Examine the class definition. how many members does it contain? class clocktype

Examine the class definition. how many members does it contain?
class clocktype
{
public:
void settime(int, int, int);
void gettime() const;
void printtime() const;
bool equaltime(const clocktype& ) const;
private:
int hr;
int min;
int sec;
};
(points : 5) 7
3
4
none of the above
Show Answers
smiley29162
smiley29162
4,4(40 marks)

7

Explanation:

The class clockType consists of three member variables marked as private:

int hr; int min; int sec;

It also contains four public member functions:

void setTime(int, int, int); void getTime() const; void printTime() const; bool equalTime(const clockType&) const;

So in total it contains seven members. The member variables constitute attributes or state of the object while the member functions represent possible operations on the object.

aleort8319
aleort8319
4,4(87 marks)
Most modern workers will hold multiple job titles in multiple careers before they retirePlanning for this reality will help achieve more.

Popular Questions about the subject: Computers and Technology

One of the registers used is the program counter (PC). ordinarily...
Computers and Technology
11.04.2020 22:14
What are some catchy names for computer basics that you would...
Computers and Technology
06.04.2022 02:25
Which file extension does gimp save a file in (before saving it...
Computers and Technology
14.05.2021 06:23
Is it true file names should describe what is in the file in a...
Computers and Technology
24.02.2023 14:24
Emma finished typing a long project proposal. she quickly sent...
Computers and Technology
24.07.2020 17:07
The series of frames in between the keyframes are drawn in a process...
Computers and Technology
19.05.2022 19:32
Question 8 Consider the following code: a = 3 b = 2 print (a **b)...
Computers and Technology
23.06.2020 05:54
What is call by reference in function of c...
Computers and Technology
24.08.2022 10:57
First analog device don t give example say the device name...
Computers and Technology
20.09.2020 08:13
After 4 years of night school and nearly half a year waiting for...
Computers and Technology
09.10.2020 15:40

New questions by subject

#
#
#
#
# #

We expand our knowledge with many expert answers