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
How to make text icome one word at a timen filmora
bezimeni [28]

You would want to add multiple text slides.

I hope this helps as the wording of the question was unclear.

8 0
2 years ago
When creating a report,you can mske groups and subgroups by?​
Mnenie [13.5K]

Answer:

content of the report

Explanation:

  • you must clarify all things
  • the report would be clean and clear
7 0
2 years ago
Define Class in C++. Briefly discuss.
lesya [120]

Answer:

Class are the collection of variable and member function.

Class are the blueprint of an object.

Explanation:

Following are the points regarding class in c++

1.In C++ class is an user defined datatype..

2.Classes are the collection of variable and function in c++.

3.To access the property of class we can create object of that class

4.We can use following syntax to declared any class in c++

class classname

{

accessmodifier:

//statement and function

};

main()

{

classname objectname;

}

implementation of class in c++

#include<iostream>

class test // class declaration

{

public: // access modifier

void fun3() // Method definition

{

cout<<" hello :";

}

};

void main() // main function

{

test ob;// creating object

ob.fun3(); // calling function

}

In this program we declared a class "test " in class test. We giving public access modifier .The public access modifier define that variable and function are accessible outside the class and in main method we create the object ob which call the function fun3().

Output:hello :

3 0
3 years ago
Help please, on tuesday we have oral presentation in zoom and i am afraid to speak in front of people, and i don't know what to
Lapatulllka [165]

Answer:

You should be strong, and be sure about what you want to say. Make sure when you speak it is clear, and makes sense.

Explanation:

If you don't speak up or sound like you know what you are talking about. I like to think of it as dancing. Act like you own the stage, or in your case, like you own the presentation. Also, I suggest you speak to your teacher in private, about him ignoring you. If I were you, I would look for newer friends. Ones that won't ignore you.

6 0
3 years ago
What are the specifications of mine shaft head gear​
svetlana [45]

Answer:

the depth of the shaft,

the carrying load of the skip and the mass of the counterweight,

the approximate size of the winding drum,

the approximate height of the headgear and the sheave wheel

4 0
2 years ago
Read 2 more answers
Other questions:
  • Which type of security personnel may work for government as well as for private security agencies?
    7·2 answers
  • True or false An electronic form uses input fields in which the user can enter data from their own computer and then transmit t
    10·1 answer
  • Kuta software infinite pre- algebra multiplying polynomial and a monomial find product answer key
    14·1 answer
  • How do I attach a file on the computer?
    13·1 answer
  • The mathematical constant Pi is an irrational number with value approximately 3.1415928... The precise value of this constant ca
    12·1 answer
  • Design a flowchart for an algorithm which adds prim numbers starting from 1 up to 50. Change
    9·1 answer
  • Assume you are given a boolean variable named isNegative and a 2-dimensional array of ints that has been created and assigned to
    8·1 answer
  • Can anyone tell me about Microsoft some important features for partical
    11·1 answer
  • Cyber vulnerabilities to dod systems may include
    12·1 answer
  • When designers follow accepted standards and protocols, which of the four basic characteristics of network architecture is achie
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!