The Barking Lot is a dog day care center. Design a flowchart or pseudocode for following:a. A program that accepts data for an ID number of a dog’s owner, and the name, breed, age, and weight of the dog. Display a bill containing all the input data as well as the weekly day care fee, which is $55 for dogs under 15 pounds, $75 for dogs from 15 to 30 pounds inclusive, $105 for dogs from 31 to 80 pounds inclusive, and $125 for dogs over 80 pounds. b. A program that continuously accepts dogs’ data until a sentinel value is entered, and displays billing data for each dog.

Question
Asked Feb 5, 2020
8 views
The Barking Lot is a dog day care center. Design a flowchart or pseudocode for following:
a. A program that accepts data for an ID number of a dog’s owner, and the name, breed, age, and weight of the dog. Display a bill containing all the input data as well as the weekly day care fee, which is $55 for dogs under 15 pounds, $75 for dogs from 15 to 30 pounds inclusive, $105 for dogs from 31 to 80 pounds inclusive, and $125 for dogs over 80 pounds.
 
b. A program that continuously accepts dogs’ data until a sentinel value is entered, and displays billing data for each dog.
 
check_circle

Expert Answer

Step 1:(a) Pseudocode

Code input complete data of dog and displays the total amount spend by owner tor dog maintenance depending on weight of dog.

 

START

Declare

    num IDnumber

    num age

    num weight

    num totalbill

    string name

    string breed

    Call housekeeping()

    Call detailLoop()

STOP

MODULE housekeeping()

BEGIN

    output Enter ID number ot dog owner"

    input IDnumber

    output " Enter dog name"

    input name

    output "Enter breed"

    input breed

    output "Enter age"

    input age

    output "Enter weight in pounds"

    input weight

RETURN

MODULE detailLoop()

BEGIN

    if weight > 15 then

      totalbill = 55

    else if weight >=15 AND weight <=30 then

      totalbill = 75

    else if weight >=31 AND weight <=80 then

      totalbill = 105

    else if weight > 80 then

      totalbill = 125

    endif

    endif

    endif

    endif

    output “The weekly bill is $”,totalbill

RETURN

Step 2:(a) Flowchart

Computer Engineering homework question answer, step 2, image 1

Computer Engineering homework question answer, step 2, image 2

Computer Engineering homework question answer, step 2, image 3

Step 3:(b) Pseudocode

START

    Declare

        num IDnumber

        num age

        num weight

        num totalbill

        string name

        string breed

        while IDnumöer <> 0

        BEGIN

            housekeeping()

        endwhile

        detailLoop()

STOP

MODULE: housekeeping()

BEGIN

    output “Enter ID number of dog owner"

    input IDnumber

    output" Enter dog name"

    input name

    output"Enter breed"

    input breed

    output"Enter age"

    input age

    output "Enter weight in pounds"

    input weight

RETURN

MODULE: detailLoop()

BEGIN

  if weight > 15 then

        totalbill = 55

    else if weight >=15 AND weight <=30 then

        totalbill = 75

  else if weight >=31 AND weight <=80 then

    ...

Want to see the full answer?

See Solution

Check out a sample Q&A here.

Want to see this answer and more?

Solutions are written by subject experts who are available 24/7. Questions are typically answered within 1 hour.*

See Solution
*Response times may vary by subject and question.
Tagged in

Engineering

Computer Engineering

Related Computer Engineering Q&A

Find answers to questions asked by student like you
Show more Q&A
add
question_answer

Q: Suppose an organization uses Kerberos for authentication. In terms of security and service availabil...

A: Kerberos:Kerberos is a protocol used for authentication that works on client/server network.It uses ...

question_answer

Q: this is a problem that I have how would I go about solving it?Im using python so please put the answ...

A: Algorithm: Initializes the seat prices for class A, B and CDefine main function.Display message stat...

question_answer

Q: Suppose we have a computer with the following characteristics: the magnetic disk has an accesslatenc...

A: In this problem the computer has a following characteristic:The access latency of magnetic disk has ...

question_answer

Q: Explain what is meant by the term data redundancy with the help of two tables of data.

A: Data redundancy:It means repetition of same data in the computer storage memory.It causes wastage of...

question_answer

Q: write a program that prompts the user to enter the number of students and each student name  and sco...

A: The java program and the approach that prompts the user to enter the names and the scores of the stu...

question_answer

Q: What are the pros and cons of choosing a hosted software solution to “test drive” a potential CRM so...

A: Pros of choosing a hosted software solution to test a CRM solution:   Since only a test drive is ne...

question_answer

Q: John is a great collector of pennies.  He wants to exchange his jar of pennies for as many quarters,...

A: Create a class with the main method in it, and initialize all required variables like currency names...

question_answer

Q: This is a MATLAB language problem.

A: Program:original_vector = input('Enter a vector of integers: ');modified_vector = [];c = 1;for i = 1...

question_answer

Q: Consider a simple application-level protocol built on top of UDP that allows a client to retrieve a ...

A: UDP is acronym as User Datagram protocol. It is a connectionless protocol.A simple application-level...