1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
saw5 [17]
3 years ago
11

What methods would you add to make this class declarationvery useful?

Computers and Technology
2 answers:
svlad2 [7]3 years ago
6 0

Answer:

void SetAge(int age) , void meow()

Explanation:

Since the class has an itsAge variable as private and has a GetAge() method. There should be a SetAge() method to set the value of the age.

Also, since it is a Cat class, it is better to have a method that mimics the voice of the cat, meow()

sergij07 [2.7K]3 years ago
5 0

Category(int age)- This method is used to declaring the age.

incrementingAge(int age)-This method is used for incrementing  the age.

SettingAge(int age) -This method is used to initializing the age.

These are the three methods for making declaration very useful.

Explanation:

Class Cat

{

public:

Category(int age)

{

itsAge =age;

}

int incrementingAge(int age)

{

itsAge = itsAge+ age;

}

int SettingAge(int age)

{

itsAge =age;

}

int GetAge() const;

private:

         int itsAge;

};Answer:

You might be interested in
Write a do-while loop that continues to prompt a user to enter a number less than 100, until the entered number is actually less
OLEGan [10]

Answer:

#include <iostream>

using namespace std;

int main()

{

   int userInput = 0;

   do {

       cout << "Enter a number (<100):" << endl;

       cin >> userInput;

   }

   while(userInput >= 100);

   cout << "Your number < 100 is: " << userInput << endl;

   return 0;

}

Explanation:

Inside the <em>do part</em>, ask user to enter a number and get that number.

In the <em>while</em>, check if the number is greater than or equal to 100. It is going to keep asking to enter a number until a number that is smaller than 100 is entered.

Print out the number that is smaller than 100.

8 0
3 years ago
Read 2 more answers
What is meant by polling mode in communication between software andUART and what is its disadvantage as compared to interrupt mo
g100num [7]

Answer and Explanation:

POLLING MODE: In polling mode in communication process the processor     continually check UART port for data instead of UART port signaling the process through an interrupt when data is ready as is done in interrupt mode.

 THE DISADVANTAGES AS COMPARED TO THE INTERRUPT MODE :

the disadvantages in polling mode is that the processor wastes time in checking the UART continually while in interrupt mode it is  doing useful task

until the UART interrupt this  

3 0
3 years ago
First let 2161965 answer<br> and then you ..
NARA [144]

Answer:

then you???

Explanation:

i think you're forgetting something (like you're pfp)

7 0
3 years ago
Read 2 more answers
HELP PLZZ WILL MARK BRAINLIEST
adoni [48]

Answer:

if you could capture another image of this work bc I cant make out some words I can barley make out words

4 0
3 years ago
What are the three main purposes of an operating system? Explain how the old mainframe computers were different from the compute
lbvjy [14]

Answer:(1) To manage the computer's resources, which includes central processing unit, memory, disk drives, and printers, (2) To establish a user interface

(3)To execute and provide services for applications software.

The old mainframe computers have

(1) low memory sizes

(2) slower connectivity speed

(3) Larger sizer

(4) low sophistication.

Explanation: Operating system is a system software that manages the computer resources,helps to establish user interface and it helps to provide services for application softwares.

Operating system software includes WINDOWS X,WINDOWS 7,WINDOWS 8,LINUX,etc.

Mainframe computers are computers used by large multinational companies for processing bulk data. Old mainframe computers were produced by IBM(INTERNATIONAL BUSINESS MACHINE) in the year 1952 they are classed two scientific and commercial mainframe computers with different information although they had some incompatibilities. Old mainframe computers are large in size with low processing speed, sophistication and storage compared to present day system.

3 0
3 years ago
Other questions:
  • The item that is clicked in a JList can be retrieved using the _____ method of JList.
    8·1 answer
  • How do I write code in Java for "A spinner for a game has four possible options: blue, red, yellow, green. The chance of landing
    10·1 answer
  • A type of Knowledge Management System is called
    5·1 answer
  • 2. What is data redundancy?
    14·1 answer
  • From which type of data storage does the CPU load information for processing during normal operation?
    14·1 answer
  • File-sharing utilities and client-to-client communication applications can provide the capability to share files with other user
    14·1 answer
  • Please help please I will count your answer brainiest if you help!
    8·1 answer
  • If Laura wanted to solve a problem using recursion where the last statement executed is the call to the same method, what type o
    8·1 answer
  • Simple example of hybrid computer​
    7·2 answers
  • A. Get a value for x from the user.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!