Question

Please Write in Pseudocode: When people think of Rome, Italy, they think of its famous ancient...

Please Write in Pseudocode:

When people think of Rome, Italy, they think of its famous ancient ruins. However, less people know that the ruins are overrun with the “Gatti di Roma” – or Cats of Rome. Yes, that’s a real thing! The Italian government wants you to write a program to help track the cats, which starts with writing class Cat. All cats have a name as well as whether or not they have been seen by a doctor. By default, cats have not been seen by a doctor. Write the Cat class below, the attributes/variables for the class, as well as a constructor. Finally, write method “VisitDoctor” which sets the class variable to TRUE.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Here is the C++ Code :

class Cat
{
string name;
bool visitdoc;

public:
Cat()
{
//false means cat has not visited to doctor yet
visitdoc=false;
}
void setName(string n)
{
name=n;
}
void VisitDoctor()
{
visitdoc=true;
}
};

from the above code we will generate our pseudocode :

So first of our Cat class will contain two variables that are name - name of that cat and visitdoc - which will tell us whether that cat has visited to doctor or not.

In default constructor

visitdoc will set to false

function setName( argument of string type)

name of the cat will be set by using this argument

function VisitDoctor()

this function will set the value of visitdoc to true which will represent that the cat has been visited to doctor.

Please tell me if you want some more functionalities as I have implement as much as it was present in the question.

Add a comment
Know the answer?
Add Answer to:
Please Write in Pseudocode: When people think of Rome, Italy, they think of its famous ancient...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • The goal of this homework is to write a small database system for an Animal Shelter....

    The goal of this homework is to write a small database system for an Animal Shelter. This is a no-kill shelter like the one just west of the Addition Airport. You will accept animal “donations” to the shelter, but mostly only dogs and cats. (But yes, there may be the occasional hamster or other nondog, non-cat animal donation.) At present, all we need to do is write the skeleton of a database that will track all the animals in the...

  • WRITE IN PSEUDOCODE USING THE FOLLOWING GUIDELINES Classes Program 1: WAKA, WAKA. Pac-Man was a big...

    WRITE IN PSEUDOCODE USING THE FOLLOWING GUIDELINES Classes Program 1: WAKA, WAKA. Pac-Man was a big hit back in the 80s. One of the things he could do was “teleport” from one side of the screen to the other, and that’s what we’re going to implement here. For this program, you’re going to write a class (called “PacMan”) that only has two attributes: an X and Y location. Imagine the player is on a 10x10 grid and starts at location...

  • Solve it by JAVA please. Now, write a class named InputSplitter. This class will take input...

    Solve it by JAVA please. Now, write a class named InputSplitter. This class will take input from the keyboard (using a Scanner) and split the incoming tokens into integers, floating point numbers, and strings. The incoming tokens will be added to one of three accumulators which start out at zero, and which keep a running total. Thus, the class will have an accumulator for integers. It starts out with the value zero. Every time another integer is read in, it...

  • Please help Below is another people post. Please help to write some responds to this post...

    Please help Below is another people post. Please help to write some responds to this post (For example, what do you think about this post. How do you think about this post, does it clear. What do you learn from this. something like that) Paragraph #1: Patient’s age, sex, brief PMHx, explanation of current medical situation JG is a 66 year old male who is on hospice comfort care. His previous and current comorbidities include: Obsessive compulsive disorder, schizophrenia, Parkinson’s...

  • Please USE JAVA only Write a class named InputSplitter. This class will take input from the...

    Please USE JAVA only Write a class named InputSplitter. This class will take input from the keyboard (using a Scanner) and split the incoming tokens into integers, floating point numbers, and strings. The incoming tokens will be added to one of three accumulators which start out at zero, and which keep a running total. Thus, the class will have an accumulator for integers. It starts out with the value zero. Every time another integer is read in, it is added...

  • Make sure to include: Ship.java, ShipTester.java, Location.java, LocationTester.java, Grid.java, GridTester.java, Player.java, PlayerTester.java, battleship.java. please do every...

    Make sure to include: Ship.java, ShipTester.java, Location.java, LocationTester.java, Grid.java, GridTester.java, Player.java, PlayerTester.java, battleship.java. please do every part, and include java doc and comments Create a battleship program. Include Javadoc and comments. Grade 12 level coding style using java only. You will need to create a Ship class, Location class, Grid Class, Add a ship to the Grid, Create the Player class, the Battleship class, Add at least one extension. Make sure to include the testers. Starting code/ sample/methods will be...

  • - Write a 3-4 paragraph summary of the following interview - This is for a Capstone...

    - Write a 3-4 paragraph summary of the following interview - This is for a Capstone II class (A writing class for Business Students) - Senior level writing is required. - The subject being discussed is Fashion Inclusivity or Inclusion (specifically the prejudice and stereotyping of MINORITY women at school/workplace) - This has lead people to discriminate against them for having more "curvy" and womanly features than women from other ethnic groups. ** Interview 1: 1. What do you see...

  • *** Please write a half-page Summary on this following article about Brexit. Thank you. Shared from...

    *** Please write a half-page Summary on this following article about Brexit. Thank you. Shared from the 12/14/2019 Houston Chronicle eEdition Brexit’s advance is latest blow to postwar trade order LONDON — For more than seven decades, the global powers that be operated on the assumption that greater economic integration amounts to historical progress. But that era is over, as Britain’s voters have now made clear. The decisive majority secured by Prime Minister Boris Johnson and his Conservative Party all...

  • Write 6-7 Sentences For Your Response: Did the City of Dixon have the appropriate internal controls?...

    Write 6-7 Sentences For Your Response: Did the City of Dixon have the appropriate internal controls? What elements do you think they fell short in? Information Welcome to Dixon Illinois about an hour and a half west of bustling Chicago but it has the genteel feel of a small town from the Dixon arch, a lucky horseshoe that hangs over the quaint community to the bright white boyhood home of Ronald Reagan. Reagan isn't just Dixon's claim to fame, he's...

  • Hello! Could you please write your own four paragraph (5-6 sentences per paragraph) take away or...

    Hello! Could you please write your own four paragraph (5-6 sentences per paragraph) take away or reflection of the below information? Please complete in 24 hours if possible. Thank you! RIS BOHNET THINKS firms are wasting their money on diversity training. The problem is, most programs just don’t work. Rather than run more workshops or try to eradicate the biases that cause discrimination, she says, companies need to redesign their processes to prevent biased choices in the first place. Bohnet...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT