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

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

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

Computer Engineering

© 2020 bartleby. All Rights Reserved.