| Kristen Anderson, Jeffrey Young | Catherine Doyle, Ryan Ersland | ||
| Jake Elder, Corazon Irizarry, Chelsea Bainbridge-Donner | Nick Dragu, Jesse Vazquez | ||
| Jin Feng Liu, Greg Vaughan | Zain Khan, John Wilsterman |
This does not mean that you cannot talk to classmates about your work. It is okay to discuss in general how you are tackling a particular problem -- e.g., "I used a String to store the value input by the user." You may also give help to or receive help from a classmate about a particular error message or program bug. "That error means you must have forgotten a semicolon."
However, you may not copy another person's code or solution, whether from a classmate or from someone who took the course before or from someone you find on the Internet, in whole or in part, either by hand or electronically, and submit it as your own. If you need help with either design or programming, you should consult with the Instructors or TAs or with the CPSC Study Hall Consultants. If you receive substantial help from another student or a TA or an Instructor, you must document it in your program's header by providing the name of the person who helped you and a brief description of the type of help you received. Getting help on an assignment and not documenting it is a form of plagarism.
You are to write a program that calculates the monthly charge to be paid by a client of the health club. Clients may sign up for three different plans that have different base rates and different privileges. The monthly charge is calculated based on the base rate, plus a charge for all classes taken beyond the number of classes included in the base rate. The plans are listed below:
Input: The program must take the following information as input from the keyboard:
Enter client name: Ollie Ordinary Enter client age: 32 Enter client license number: 3293939 Enter the client's plan letter (B, P, or E): P Enter the number of classes taken: 10 Name: Ollie Ordinary Age: 32 License: 3293939 Plan: Privileged MONTHLY CHARGES: Basic rate: $40.0 Extra class charge $0.0 Volume discount: $0.0 Total charge: $40.0You must abide by the following:
Enter client name: Ella Exerciser Enter client age: 23 Enter client license number: 3294089o Enter the client's plan letter (B, P, or E): E Enter the number of classes taken: 20 Name: Ella Exerciser Age: 23 License: 32940890 Plan: Elite MONTHLY CHARGES: Basic rate: $60.0 Extra class charge $100.0 Elite discount $0.0 Volume discount: $0.0 Total charge: 160.0
Enter client name: Lazy Leno Enter client age: 30 Enter client license number: 4902904 Enter the client's plan letter (B, P, or E): B Enter the number of classes taken: 5 Name: Lazy Leno Age: 30 License: 4902904 Plan: Basic MONTHLY CHARGES: Basic rate: $20.0 Extra class charge $0.0 Volume discount: $0.0 Total charge: 20.0
Enter client name: Regular Ren Enter client age: 50 Enter client license number: 83939393 Enter the client's plan letter (B, P, or E): P Enter the number of classes taken: 13 Name: Regular Ren Age: 50 License: 83939393 Plan: Privileged MONTHLY CHARGES: Basic rate: $40.0 Extra class charge $60.0 Volume discount: $0.0 Total charge: 100.0
Enter client name: Ready Rollo Enter client age: 20 Enter client license number: 32323232 Enter the client's plan letter (B, P, or E): B Enter the number of classes taken: 25 Name: Ready Rollo Age: 20 License: 32323232 Plan: Basic MONTHLY CHARGES: Basic rate: $20.0 Extra class charge $450.0 Volume discount: $47.0 Total charge: 423.0
Enter client name: Willa Warmup Enter client age: 60 Enter client license number: 3290343 Enter the client's plan letter (B, P, or E): E Enter the number of classes taken: 3 Name: Willa Warmup Age: 60 License: 3290343 Plan: Elite MONTHLY CHARGES: Basic rate: $60.0 Extra class charge $0.0 Elite discount $3.0 Volume discount: $0.0 Total charge: 57.0