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]
4 years ago
11

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

Computers and Technology
2 answers:
svlad2 [7]4 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]4 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
An IP packet to be transmitted by Ethernet is 60 bytes long, including all its headers. If LLC is not in use, is padding needed
salantis [7]

Answer:

No padding

Explanation:

64 bytes is taken as the minimum Ethernet frame, this encompass checksum as well as addresses in the Ethernet frame header and length field. while the maximum Ethernet frame is 1518 bytes, any minimumEthernet frame that is short compare to that will need receiving stations to interpret it as a collision. The question specified that the IP packet to be transmitted by Ethernet as 60 bytes long. The header fields here can occupy 18 bytes, Then total frame size becomes 78 bytes. With the total frame size of 78 bytes(60 bytes+ 18 bytes) we can see it has exceeded the 64-byte minimum. Hence there is no padding used.

6 0
3 years ago
Consider the eight bit signed binary number 1110 0101. Convert it to signed decimal from assuming the signed binary number is re
alukav5142 [94]

Answer:    -26

Explanation:

We have:  1 1 1 0   0 1 0 1

Since it’s one’s complement representation, then we check the very first digit to state if the number is negative or positive. Since the very first digit to the left is 1, then the number will be negative.

When it is negative, we now flip the bits, so that we get:

0 0 0 1   1 0 1 0

Notice we just turn the 1’s into 0’s and vice versa.

We now convert this binary into decimal:

We assign to each digit the corresponding power of 2.  

See it in a table:

\begin{matrix}0&0&0&1&1&0&1&0\\2^7&2^6&2^5&2^4&2^3&2^2&2^1&2^0 \end{matrix}

Then multiplying each digit by its corresponding power of 2 and then adding the results, we get:

2^4+2^3+2^1

We get:

16+8+2=26

Since we stated that the number is negative, then, the final result is: -26

4 0
3 years ago
Hawaii and japan are examples of islands made by? You have to write it.
Brums [2.3K]

Answer:

Volcanic activity

5 0
3 years ago
what is the keyboard shortcut to display formulas on the worksheet : a. CTRL+ B. CTRL+: C. CTRL+; D. ALL THE ABOVE
Orlov [11]
Girl i dont know figure it out pookie
4 0
3 years ago
How do films use camera shots?
lorasvet [3.4K]
These advanced camera shots, or angles, are used in film to convey an effect or emotion rather than exemplify a sense of space. Before filming, cinematographers will write out their shot list in order to plan how each scene of their film should be shot
7 0
3 years ago
Read 2 more answers
Other questions:
  • What is the legal right granted to all authors and artists that gives them sole ownership and use of their words, software, pict
    9·2 answers
  • A(n) __________ is a recording of a motion picture, or television program for playing through a television.
    8·2 answers
  • Clep allows students to do all of thw following except which?
    9·2 answers
  • Stuck on where to go with this one.
    15·1 answer
  • Careers in information technology deal with
    12·2 answers
  • What Does S.T.E.M stand for?​
    8·1 answer
  • What are some disadvantages of using a word processor over a type writer?​
    7·1 answer
  • Plssssssssssssss help quick
    8·1 answer
  • Write function that ask for input from a user. Use this input as input for the countdown function that we wrote using the while
    6·1 answer
  • When memory allocation is ____, it means all portions of the program and OS are loaded into sequential locations in memory.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!