Programming Assignment | Online Homework Help

ITP100 Fall 2018 Final Homework Programming Assignment:

Requirements: No IPO Chart or Structure Chart is required…only pseudocode for these Problems.

Problem 1: One Dimensional Array Processing: 20 Points

You work for Busch Gardens and your job is to calculate statistics about how many tourists visit each week to help supervisors staff the park adequately to meet tourist demands. You need to input the number of tourists attending into a one dimensional array and then calculate and write the average number of tourists, the lowest number of tourists, and highest number of tourists for the 7 day period.

  • Your program must include 1 VALUE RETURNING FUNCTION called CalcAverage() that accepts 2 parameters/arguments for calculating the average and returning it to the main method.
  • For loop(s) are required for processing arrays.

The program will run like this where the user input is bolded and italicized and the output report begins with Attendance Analysis. The output report should only print right before the program ends. Your program should run for any data given and not just the test data shown below.

Please enter the attendance for Sunday: 65000
Please enter the attendance for Monday: 60000
Please enter the attendance for Tuesday: 50000
Please enter the attendance for Wednesday: 52000
Please enter the attendance for Thursday: 52500
Please enter the attendance for Friday: 62000
Please enter the attendance for Saturday: 68000

Attendance Analysis:
The Average Attendance is 58500.
The Lowest Attendance is 50000
The Highest Attendance is 68000

Problem 2: Writing a Function/Method: 20 Points

The Everything Is A Dollar store is having a once in a year sale where all items in the store that normally sell for 1 dollar are discounted by 10%.

  1. After the main() method ends, write a value returning function called setDiscountAmount that returns the discountAmount.
  2. In the main() method, call the setDiscountAmount() function. You have to determine the variables that should be passed within the () to the setDiscountAmount() function to calculate the discount amount correctly.
  3. In the main() method, calculate the price after discount.
  4. In the main() method, display the original price, the discount amount, and the price after discount.

 

 

 

 

 

main()

 

Declare Real price = 1.00 //Everything costs $1.00 in the store

Declare Real discountRate = .10 //This is 10% converted to a decimal

Declare Real discountAmount = 0.00 //You must calculate the discountAmount

Declare Real priceAfterDiscount = 0.00 //You must calculate the priceAfterDiscount

Display “Use the Everything Is a Dollar Discount Calculator”

//Finish this program. The solution requires less than 10 lines of code.

 

Problem 3: Writing a Decision Structure: 20 Points

A pizza truck that sells only cheese pizza uses the following pricing rules:

Pizza Size:               Small                      $1.50 per Slice                      $8.00 per Pie               Medium                 $1.75 per Slice                      $10.00 per Pie               Large                     $2.00 per Slice                      $12.00 per PieYou are tasked with building a user friendly app that allows the user to order pizza from the truck. Your app must then display the price. Pizza Size (S, M, L)Type Code              (S to order a slice. P to order a pie.)Quantity (User can order a maximum of only 1 pie at a time. User can order a maximum of 8 slices at a time.) Given the following code, complete the Decision Statement that sets the price for an order then display the price. main()Declare String sizeDeclare String typeDeclare Integer quantityDeclare Real priceDisplay “Please enter the size (S, M, L):”Input sizeDisplay “Please enter the type (S for Slice or P for Pie): “Input typeDisplay “Please enter the quantity (1 for a pie, or 1 to 8 for slices): “Input quantity//Finish the program. The solution requires less than 25 lines of code

 

 

 

My Homework Nest
Calculate your paper price
Pages (550 words)
Approximate price: -