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
The CSS property of top , bottom , left , or right moves the element the specified distance from the respective edge of the clos
borishaifa [10]

Answer:

Relative

Explanation:

Web development is a process of designing and building a web page or website. HTML, CSS and JavaScript are the basic tools used in building a website.

Cascading style sheet or CSS is a web development tool used to style the content of a HTML file. Css has pointers used to represent HTML elements for styling. A HTML element can be fixed, absolute or relative.

When a CSS file sets an element relative to it container or other element, the element can be moved to the right, left, top or bottom position relative to the four corners of the parent element.

7 0
3 years ago
Constantine forms the following hypothesis. Let n be any non-negative number that meets the following condition: when n is divid
notka56 [123]

Answer:

n=5

Explanation:

if n= 5

i.     n/5=5/5=1  so it divides completely the remainder is 0

ii.  97 - 6(5) = 97 - 30 = 67,   67 is a prime number.

8 0
3 years ago
Please Help ASAP. Marking Brainliest For Correct Answer.
mezya [45]

Answer: It is not working because it is missing the code needed to turn right.

Sentence :The robot would move forward two squares and would stay stuck there because it can not move forward nor turn left. You would need to add code for the robot to be able to turn right so that the robot can reach the goal

6 0
3 years ago
Which of the following is a feature that is in the Excel program and NOT in Word? (Select all that apply.)
nikklg [1K]
I believe it is workbooks.
5 0
3 years ago
Windows organises information on computer using a
zhuklara [117]
The correct answer is b folder
6 0
3 years ago
Read 2 more answers
Other questions:
  • You work in a customer call center. Martin is on the phone asking about the difference between solid-state drives (SSDs), hybrid
    6·1 answer
  • Why is it important to evaluate the website on which you plan to shop?
    11·2 answers
  • What are the advantages of homogenation
    5·1 answer
  • Scientific models can be used for a variety of different purposes. Which of the following statements about scientific models is
    7·2 answers
  • You have been asked to report on the feasibility of installing an IP CCTV camera system at your organization. Detail the pros an
    5·1 answer
  • PLEASE HELP!!! THIS IS WORTH A TEST GRADE!!!
    13·1 answer
  • In C#Write the program SubscriptExceptionTest in which you use an array of 10 doubles. Write a try block in which you place a lo
    5·1 answer
  • Please be my friend. my best and only friend isn't talking to me for some reason
    9·2 answers
  • 4.5 code practice computer science
    5·1 answer
  • Write pseudocode for the question below:
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!