Reference no: EM13782888
1. Library Fines
A local public library needs a program to calculate the overdue fines owed by its patrons. The library needs the clerk to enter the full name and age of the patron. The clerk also needs to enter the name and the number of days overdue for the item. (The library accounts for full days overdue and not partial days overdue.) The library wants the clerk to be presented with a menu from which the type of material overdue can be chosen. The menu should look as follows:
1. Book
2. Magazine
3. DVD
Books that are overdue are assessed a fine of 50 cents per day. Magazines are assessed a fine of 25 cents per day. DVDs are assessed a fine of $1.50 a day. There is a maximum fine assessed of $5.00. Senior Citizens (over the age of 70) do not pay fines. Juvenile patrons (ages 6 through 17) pay a maximum fine of $1.00.
Once the fine has been calculated all information about the patron and the overdue material should be printed to the screen. Here is an example of the report that should be output:
Name Mickey Mouse
Age 22
Item Name Fantasia
Item Type DVD
Number of Days Overdue 2
Overdue Fine $3.00
Each time the program is executed it calculates the fine for a single item. If the user enters invalid data, then a message must be presented on the screen specifying the invalid information and the calculation is aborted.
HINT - no loops can be used in this problem.
Also remember we do not know how to compare strings.
a) Rewrite this problem statement in your own words. Create a list of short bulleted phrases showing all details about this problem. This list should include both the explicitly defined and implied details in the problem statement. Consider what information the program needs to remember in order to meet the requirements of the problem statement. Consider what tasks need to be completed by the program in order to meet the requirements of the problem statement. (Hint - do you think this rewritten problem statement will be longer or shorter than the original problem statement?)
Print out this rewritten problem statement to turn in with this homework.
b) Run your program multiple times using the following information as input. After each run of the program save your entire console output screen to a text file as discussed in our labs.
· You have an overdue book titled Introduction to Java. This book is 5 days overdue.
· Mickey Mouse is 75 years old and has an overdue magazine titled Travel to Disney World. The magazine is 1 day overdue.
· Minnie Mouse is 30 years old and has an overdue magazine titled O Magazine. The magazine is 10 days overdue.
· Charlie Brown is 10 years old and has an overdue DVD titled Charlie Brown Christmas. The DVD is 2 days overdue.
· Goofy Dog is 50 years old and has an overdue DVD titled 101 Dalmations. The DVD is 2 days overdue.
· Snoopy Dog is 20 years old and has an overdue book titled Doghouse Repair. The book is 60 days overdue.
c) Print out a copy of your source code and your output text file to turn in with this homework.
Disadvantages of having diversity training
: What are the advantages and disadvantages of having diversity training conducted by internal employees versus using an outside consultant? Which would you prefer?
|
Assignment on motivating employees
: Finding ways to motivate employees and creating a workplace where they are motivated and feel appreciated can be a challenge for managers.
|
Create a visual basic windows application
: Create a Visual Basic Windows application. Use the following names for the solution, project, and form file, respectively: Georgetown Solution, Georgetown Project, and Main Form.vb. The interface allow the user to enter a five-digit credit card nu..
|
Does our analysis of the foreign exchange market
: The dollar's exchange rates against foreign currencies became more volatile. Does our analysis of the foreign exchange market suggest any connection between these two events?
|
Create a list of short bulleted phrases showing all details
: Rewrite this problem statement in your own words. Create a list of short bulleted phrases showing all details about this problem. This list should include both the explicitly defined and implied details in the problem statement.
|
Why did you select the six team members you did
: Your objective is to individually select a team of six people from the given teammate profiles. Begin by reading "West Coast Transit Company Profile" and "West Coast Transit Team Member Profiles," which are attached in the Topic Materials. Based on y..
|
New german cinema and italian film-makers
: Explain the techniques and the similarities and differences between the French New Wave Cinema and the "Angry Young Man" or "kitchen sink realism" cinema school of Great Britain in the 1960s with the New German Cinema and Italian film-makers of th..
|
Final assignment on hifsa
: It may include explanation and examples from previous experience as well as implications for future application.
|
Program should prompt the user at the beginning
: The program should prompt the user at the beginning for the number of different milk quantities to evaluate in this one run of the program.
|