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
  • create flowchart using Flowgorithm and Pseudocode for the following program example: Pet Care is a doggy...

    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 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 sure to use a...

  • 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...

  • 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):...

  • Blood alcohol content (BAC) is a measure of how much alcohol is in someone’s blood. It...

    Blood alcohol content (BAC) is a measure of how much alcohol is in someone’s blood. It is usually measured as a percentage, so a BAC of 0.3% is three-tenths of one percent. That is, there are 3 grams of alcohol for every 1,000 grams of blood. A BAC of 0.05% impairs reasoning and the ability to concentrate. A BAC of 0.30% can lead to a blackout, shortness of breath, and loss of bladder control. In most states, the legal limit...

  • 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...

  • Write a program in java. You are tasked with writing an application that will keep track...

    Write a program in java. You are tasked with writing an application that will keep track of Insurance Policies. Create a Policy class called InsurancePolicies.java that will model an insurance policy for a single person. Use the following guidelines to create the Policy class: • An insurance policy has the following attributes: o Policy Number o Provider Name o Policyholder’s First Name o Policyholder’s Last Name o Policyholder’s Age o Policyholder’s Smoking Status (will be “smoker” or “non-smoker”) o Policyholder’s...

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