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
in python Write a loop that counts the number of lowercase characters that appear in the string referenced by mystring.
exis [7]

Answer:

mystring = "My name is David Acheme"

count = 0

for i in mystring:

    if(i.islower()):

        count=count+1

print("The number of lowercase characters in: "+mystring)

print(count)

Explanation:

1. We declare a String Variable and assign a value.

2. Intialize a count variable to zero.

3. Using a for loop is to loop through each characters in the string.

4. The if condition checks when a lower case character is encountered using the islower method and increases count by 1

5. Prints the value of count.

5 0
4 years ago
PLEASE HELP
lilavasa [31]

This assignment is required to be executed in python programming language. See the code below.

<h3>What is the code that displays word pairs that differ between the two sentences?</h3>

# taking two sentence as input s1 = input() s2 = input()  

# getting the words in both sentences in list w1 = s1.split() w2 = s2.split()  # looping through the word lists and checking if they are equal or not for i in range(len(w1)):  

# printing word pairs if they are not equal

if (w1[i] != w2[i]):

 print(w1[i],w2[i])    

Learn more about python programming language at;
brainly.com/question/26497128
#SPJ1

4 0
2 years ago
Question = 5 Which of these causes problems because it causes all words to have the same shape? ​
Sever21 [200]
Where’s the picture?? Send the picture I’m not tryna just get points I want to help but you didn’t upload a picture
5 0
3 years ago
Which is the 6-by6 rule for presentations
marin [14]

Answer:

You might already be familiar with the 6×6 rule. This presentation rule suggests that you should include no more than six words per line and no more than six bullet points per slide. The goal is to keep your slide from being so dense and packed with information that people don't want to look at it

7 0
4 years ago
Select one among the the main categories of computer software, which one is not a category
kakasveta [241]

Answer:

utilities

Explanation:

the other 3 are Cs programs

7 0
3 years ago
Other questions:
  • Which new jobs will be in demand in the next 20 years
    5·1 answer
  • What do we call the distribution and access of illegal copies of digital books??
    10·1 answer
  • The method header of the equals() method within the string class is ____.
    13·1 answer
  • Keyshia is preparing a report about the different tools that are used in a science laboratory. She wants to edit a picture of gl
    11·2 answers
  • __________ describes a module for which the software developer does not care how the processing is performed, but instead, knows
    7·1 answer
  • The _____ is the button that you push to take a photograph. i think its B Help PLZ
    5·1 answer
  • Advancements in nuclear science have led to technological advances which are both harmful and beneficial. Which would be conside
    15·1 answer
  • Tests that replace_punctuation() replaces 1 exclamation point and 2 semicolons in "we'll continue our quest in space. there will
    14·1 answer
  • Jason is working on a Microsoft Excel worksheet and he wants to create a Print Preview shortcut. His teacher asks him to access
    9·1 answer
  • Identify the parts of it, Give at least three web browser that you usually used to visit a website.​
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!