Question

Pet Care is a doggy day care that would like you to create a program that...

Pet Care is a doggy day care that would like you to create a program that accepts the dog owner's name pet's name, breed, and weight of the dog. The program should allow the user to enter this data until a sentinel value is reached. Then it will display the dog's name if the dog weighs less than 20 pounds or more than 100 pounds. Could I get the answer using flowgorithm and psudocode?

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

ANSWER:

GIVEN THAT:

Add a comment
Answer #2

Sure! Here's an example of the pseudocode and a flowchart in Flowgorithm for the program you described:

Pseudocode:

pythonCopy codeInitialize dogOwnerName, petName, breed, weight as strings
Initialize sentinel as boolean, set to FalseLoop until sentinel is True:
    Prompt the user to enter the dog owner's name
    Read and store the input in dogOwnerName

    Prompt the user to enter the pet's name
    Read and store the input in petName

    Prompt the user to enter the breed
    Read and store the input in breed

    Prompt the user to enter the weight of the dog
    Read and store the input in weight

    If weight < 20 or weight > 100 then
        Display petName

    Prompt the user if they want to enter data for another dog
    If user input is "no" or "n" then        Set sentinel to TrueEnd loop

Display "Program ended."

Flowchart (Flowgorithm):

csharpCopy code[Start]
   |
   V
[Initialize Variables]
   |
   V
[Loop]
   |
   V
[Input Dog Owner's Name]
   |
   V
[Input Pet's Name]
   |
   V
[Input Breed]
   |
   V
[Input Weight]
   |
   V
[Check Weight]
   |
   V
[Display Pet's Name]
   |
   V
[Continue?]
   |
   V
[End Loop]
   |
   V
[Display "Program Ended"]
   |
   V
[Stop]

Please note that Flowgorithm is a visual programming tool, so you can use the provided flowchart to create the program by connecting the appropriate flowchart symbols and adding the necessary code within each symbol.


answered by: Hydra Master
Add a comment
Know the answer?
Add Answer to:
Pet Care is a doggy day care that would like you to create a program that...
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
  • You will create flowchart using Flowgorithm and Pseudocode for the following program example:&nbs...

    you will create flowchart using Flowgorithm and Pseudocode for the following program example:   Pet Care is a doggy day care that would like you to create a program that accepts the dog owner's name pet's name, breed, age and weight of the dog. The program should allow the user to enter this data until a sentinel value is reached. Then it will display the dog's name if the dog weighs less than 20 pounds or more than 100 pounds (be...

  • solve it in c++ 10 note: please do not give me same answer like this 1....

    solve it in c++ 10 note: please do not give me same answer like this 1. Define a Pet class that stores the pet's name, age, and weight. Add appropriate constructors, accessor functions, and mutator functions. Also define a function named getLifespan that returns a string with the value "unknown lifespan." Next, define a Dog class that is derived from Pet. The Dog class should have a private member variable named breed that stores the breed of the dog. Add...

  • In Java Code Needed is Below the Question Using Program 3: Encapsulating Dogs, modify this program...

    In Java Code Needed is Below the Question Using Program 3: Encapsulating Dogs, modify this program to create a database of dogs of your own. You will also include File I/O with this program. You will create 3 classes for this assignment. The first class: Create a Class representing the information that is associated with one item (one dog) of your database. Name this class Dog. Using Lab 3, this will include the information in regard to one dog. The...

  • The Program (Java) You will create a pet database program with the following operations incrementally as...

    The Program (Java) You will create a pet database program with the following operations incrementally as describe in the Milestones section. You are not required to save the pet data into a file. You must use appropriate design and make use of Object-Oriented Design. See milestones. • Add pets o Let the user add as many pets as they want. A pet is entered as a single line consisting of a name and an integer which represents the age of...

  • Code in JAVA UML //TEST HARNESS //DO NOT CHANGE CODE FOR TEST HARNESS import java.util.Scanner; //...

    Code in JAVA UML //TEST HARNESS //DO NOT CHANGE CODE FOR TEST HARNESS import java.util.Scanner; // Scanner class to support user input public class TestPetHierarchy { /* * All the 'work' of the process takes place in the main method. This is actually poor design/structure, * but we will use this (very simple) form to begin the semester... */ public static void main( String[] args ) { /* * Variables required for processing */ Scanner input = new Scanner( System.in...

  • public class Pet {    //Declaring instance variables    private String name;    private String species;...

    public class Pet {    //Declaring instance variables    private String name;    private String species;    private String parent;    private String birthday;    //Zero argumented constructor    public Pet() {    }    //Parameterized constructor    public Pet(String name, String species, String parent, String birthday) {        this.name = name;        this.species = species;        this.parent = parent;        this.birthday = birthday;    }    // getters and setters    public String getName() {        return name;   ...

  • Create java code Make sure it runs Part 1: Your little sister has decided that she...

    Create java code Make sure it runs Part 1: Your little sister has decided that she wants a pet. You love animals and want to further engender her love of animals, but, well, her last pet, goldie the goldfish, didn’t fare too well. So you went on the hunt for a different kind of pet that will fit the bill. Much to your joy, you have found the perfect pet for her… a Bee farm! They are easy to take...

  • C++ Programming Assignment S Mammal Lab This lab's goal is to give you some practice using inheritance, virtual functions, pointers, dynamic memory allocation, random numbers, and polym...

    C++ Programming Assignment S Mammal Lab This lab's goal is to give you some practice using inheritance, virtual functions, pointers, dynamic memory allocation, random numbers, and polymorphism. To complete the lab implement the following steps: Create a class called Mammal. All mammals have a weight and a name, so its data should be the mammal's weight and name. Provide a default constructor that sets the mammal's weight to 0 and name to null, and another constructor that allows the weight...

  • Write in python code Project 11-1: Birthday Calculator Create a program that accepts a name and...

    Write in python code Project 11-1: Birthday Calculator Create a program that accepts a name and a birth date and displays the person's birthday the current day, the person's age, and the number of days until the person's next birthday Console Birthday Calculator Enter name: Joel Enter birthday (MM/DD/YY): 2/4/68 Birthday: Sunday, February 04, 1968 Today: Joel is 48 years old. Joel's birthday is in 73 days Tuesday, November 22, 2016 Continue? (y/n): y Enter name: Django Enter birthday (MM/DD/YY):...

  • (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates...

    (2 bookmarks) In JAVA You have been asked to write a program that can manage candidates for an upcoming election. This program needs to allow the user to enter candidates and then record votes as they come in and then calculate results and determine the winner. This program will have three classes: Candidate, Results and ElectionApp Candidate Class: This class records the information for each candidate that is running for office. Instance variables: first name last name office they are...

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
ADVERTISEMENT