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
Why are there more producers then consumers?​
Ivanshal [37]

Answer:

because producer can make their own food

6 0
3 years ago
Read 2 more answers
Assume that a program uses the named constant PI to represent the value 3.14. The program uses the named constant in several sta
mihalych1998 [28]

Answer:

The advantage for the above condition is as follows:-

Explanation:

  • If a user creates a defined constant variable and assigns a value on its and then uses that variable instead of the value, then it will a great advantage.
  • It is because when there is a needs to change the value of that variable, then it can be done when the user changes the value in one place. There is no needs to change the vale in multiple places.
  • But if there is a value in multiple places instead of a variable and there is no constant variable, then the user needs to change the value in multiple places.
7 0
3 years ago
How impactful were shipping errors on customer questions.
Bumek [7]

Answer:

It's due to damage of goods

7 0
2 years ago
I want to work with LDAP. what is LDAP?
pychu [463]
It's an internet protocol (Lightweight Directory Access Protocol) used to fetch data from servers.
5 0
3 years ago
Read 2 more answers
A major weakness of a lot of file processing systems is that ____.
Gnesinka [82]

They are several weaknesses or disadvantages of file processing systems but the major weakness is data redundancy and inconsistency. By data redundancy, I mean duplication of data. There are no better methods to validate insertion of duplicate data in file systems. Data redundancy can also increase the chance for errors.






7 0
4 years ago
Other questions:
  • WILL MARK BRAINLIEST HELP
    8·2 answers
  • 5. Create a variety of test cases focusing on the sorting algorithm, such as the final element is the smallest, the entire set i
    8·1 answer
  • Does a BIOS reset erase data such as pictures, programs or other things like that?
    13·1 answer
  • Primary functions of lighting are sufficient light to...
    13·1 answer
  • What is it called when servers on the Internet supply applications as a service, rather than a product
    14·1 answer
  • Need help with python coding
    12·2 answers
  • You have an audio that contains one pause for 0.2 seconds and another one for 0.6 seconds. When do you need to create a new segm
    5·1 answer
  • Cultural differences may make it difficult for team members to _____. Select 4 options.
    14·1 answer
  • What is the purpose of the Subtotal feature?
    9·1 answer
  • Michelle has defined a custom object by creating an object literal. She wants to access the properties of the custom object. Mic
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!