# CSC 200 Program Design and Pseudo code

All parts of this homework must be completed before class begins on the due date listed in the syllabus.

Homework is not a group activity, but instead each student must complete individual work. By completing your own work you will be sure that you understand the material. If you have questions e-mail your instructor or visit her during office hours.

1. Architect Fee

For the following problem statement you must complete a rewritten problem statement and a Defining Diagram. No hand written work will be accepted. You must print out a copy of each to turn in with this homework. [25 Points]

Problem Statement:

An architect’s fee is calculated as a percentage of the cost of a building. The fee is made up as follows: 8% of the first $5000 of the cost of a building and 3% of the remainder if the remainder is less than or equal to $80,000 or 2.5% on the remainder if the remainder is more than $80,000. The architecture firm would like a tool that will calculate the architect’s fee based on the cost of a building. The architect will enter the employee ID and the cost of the building at the keyboard. The program should print out the employee ID, the cost of the building and also the architect’s fee.

2. Classic Reunions

Use the following problem statement and defining diagram to create a flow chart and pseudo code for the solution. No hand written work will be accepted. You must print out a copy of the flow chart and the pseudo code to turn in for this homework. [55 Points]

Problem Statement

Classic Reunions is a company that provides services for organizers of high school class reunions. The company needs a program that will determine the cost of a reunion event per person. The company is charging $200 per hour for renting its on-site party room, $350 for their house band for the evening, and $40 a plate for dinner. The user of the program will use the keyboard to enter the number of guests for the event and the length of the event in hours. The program should print out the complete information for the event including the number of guests, the length of the event, and cost per person for the event.

Defining Diagram:

Input

Processing

Output

Number of guests

Display a prompt message for number of guests

Prompt message for number of guests

Length of event (in hours)

Read in number of guests from keyboard

Error message for invalid number of guests

Validate number of guests 0

Prompt message for length of event

Display error message for invalid number of guests

Error message for invalid length of event

Continue to prompt, read, and validate number of guests until valid

Number of guests

Display a prompt message user for length of event in hours

Length of event

Read in length of event from keyboard

Cost per person for event

Validate length of event 0

Display error message for invalid length of event.

Continue to prompt, read, and validate length of event until valid

Calculate the total cost to rent the party room for the event

Calculate the total cost for the party room and the band for the event

Calculate the total cost per person for the party room and the band

Calculate the total cost per person for the event using the cost per person for the dinner and the cost per person for the party room and the band.

Display number of guests

Display length of event

Display cost of event

3. Doggie Day Care

For the following problem statement you must complete a rewritten problem statement, a defining Diagram, a flow chart, and the pseudo code. No hand written work will be accepted. You must print out a copy of each to turn in with this homework. [100 Points]

Problem Statement:

A Doggie Day Care Center boards dogs. The Day Care charges $25 a day for dogs that weigh more than 50 pounds and $20 a day for smaller dogs. The Day Care can board a maximum of 8 dogs per day. The expenses for the Day Care include $2 per day per dog for food (no matter what size dog) and $30 per day for utilities. Create a program that will determine the total revenue collected for the day as well as the total expenses for the day. The output of the program should include the total number of dogs boarded for the day, the total revenue, the total expenses for the day, and the profit for the day.

Homework is not a group activity, but instead each student must complete individual work. By completing your own work you will be sure that you understand the material. If you have questions e-mail your instructor or visit her during office hours.

1. Architect Fee

For the following problem statement you must complete a rewritten problem statement and a Defining Diagram. No hand written work will be accepted. You must print out a copy of each to turn in with this homework. [25 Points]

Problem Statement:

An architect’s fee is calculated as a percentage of the cost of a building. The fee is made up as follows: 8% of the first $5000 of the cost of a building and 3% of the remainder if the remainder is less than or equal to $80,000 or 2.5% on the remainder if the remainder is more than $80,000. The architecture firm would like a tool that will calculate the architect’s fee based on the cost of a building. The architect will enter the employee ID and the cost of the building at the keyboard. The program should print out the employee ID, the cost of the building and also the architect’s fee.

2. Classic Reunions

Use the following problem statement and defining diagram to create a flow chart and pseudo code for the solution. No hand written work will be accepted. You must print out a copy of the flow chart and the pseudo code to turn in for this homework. [55 Points]

Problem Statement

Classic Reunions is a company that provides services for organizers of high school class reunions. The company needs a program that will determine the cost of a reunion event per person. The company is charging $200 per hour for renting its on-site party room, $350 for their house band for the evening, and $40 a plate for dinner. The user of the program will use the keyboard to enter the number of guests for the event and the length of the event in hours. The program should print out the complete information for the event including the number of guests, the length of the event, and cost per person for the event.

Defining Diagram:

Input

Processing

Output

Number of guests

Display a prompt message for number of guests

Prompt message for number of guests

Length of event (in hours)

Read in number of guests from keyboard

Error message for invalid number of guests

Validate number of guests 0

Prompt message for length of event

Display error message for invalid number of guests

Error message for invalid length of event

Continue to prompt, read, and validate number of guests until valid

Number of guests

Display a prompt message user for length of event in hours

Length of event

Read in length of event from keyboard

Cost per person for event

Validate length of event 0

Display error message for invalid length of event.

Continue to prompt, read, and validate length of event until valid

Calculate the total cost to rent the party room for the event

Calculate the total cost for the party room and the band for the event

Calculate the total cost per person for the party room and the band

Calculate the total cost per person for the event using the cost per person for the dinner and the cost per person for the party room and the band.

Display number of guests

Display length of event

Display cost of event

3. Doggie Day Care

For the following problem statement you must complete a rewritten problem statement, a defining Diagram, a flow chart, and the pseudo code. No hand written work will be accepted. You must print out a copy of each to turn in with this homework. [100 Points]

Problem Statement:

A Doggie Day Care Center boards dogs. The Day Care charges $25 a day for dogs that weigh more than 50 pounds and $20 a day for smaller dogs. The Day Care can board a maximum of 8 dogs per day. The expenses for the Day Care include $2 per day per dog for food (no matter what size dog) and $30 per day for utilities. Create a program that will determine the total revenue collected for the day as well as the total expenses for the day. The output of the program should include the total number of dogs boarded for the day, the total revenue, the total expenses for the day, and the profit for the day.

You'll get 1 file (90.5KB)