Programming Assignment 1
You have secured your first IT internship at the Mason Barkery, an old inn converted paradise hotel/kennel geared towards dogs. You have been asked to create a program to help calculate the total cost of a stay at the hotel for one dog. In order to do this, you receive the following business requirements from the owner:
When meeting a new customer, we ask for the name and weight of the dog, as well as the number of days the dog will stay at the hotel. Hotel bills are calculated by considering two costs: The weight of the dog and the length of the stay. These costs are calculated as follows: o $18.95 per day for dogs weighing 12.0 lbs. or less. o $28.95 per day for dogs weighing more than 12.0 lbs. up to and including 23.0 lbs. o $38.95 per day for dogs weighing more than 23.0 lbs. up to and including 33.0 lbs. o $48.95 per day for dogs weighing more than 33.0 lbs.
Create a program that will first ask the user for the dog’s name. Then, the program will ask for the weight of the dog and the number of days the dog will stay at the hotel. If at any time the user inputs a value of 0 or a negative number (for the weight or number of days for the stay), the program should end with a message stating the user has entered an invalid number and they should restart the program. After asking for the weight of the dog and the number of days the dog will stay at the hotel, calculate the total cost of the stay at the hotel and display a well-formatted message including the dog’s name, weight of the dog, length of the stay, and total cost of the stay.
Your solution may not use any functions or language constructs not covered during this semester’s IT 106 without prior authorization from your instructor, even if you know other functions or language constructs. We want everyone to be on the same "playing field", regardless of previous programming exposure, and get practice with algorithmic design to solve problems (the intent of the course). Using something existing not discussed in class does not give you as much practice as solving the problem yourself.
There are a number of validations that must occur. Think about what type of validation might be appropriate and make sure these are all handled. Don’t forget about what you learned about data validation.
Programming Assignment 1: Solution Design
1. Create a defining diagram that shows the input, processing, and output
2. Create a solution algorithm using pseudo code
3. Show testing using the desk checking table method, to include test data, expected results, and a desk checking table. Make sure your desk checking considers multiple cases including both valid and invalid test data to prove your algorithm will work in all cases
Upload a Word document containing only items.