Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Do 1 from part A and 1 from part B (Your choice): Write a separate program for each of your two choices. (10 points each

image text in transcribed
image text in transcribed
Do 1 from part A and 1 from part B (Your choice): Write a separate program for each of your two choices. (10 points each - points are listed below). See my sample on the last page. It contains all the pieces and parts that are required here! Include, in the top block comment, the section for Input, Processing, and Output First line of the top block comment: Project 1, Part A (or B). The name of the project A short description of your project The section for Input, Processing, and Output: Input: What is it that you will need for the program? Processing: What is it that you will compute? Output: What is it that you will display? @name (name) @version (date) Break down the program into smaller parts. Include line comments within your main method for the main parts of your program. Include blank lines within your code for readability! You must include this for any credit: Below the last closing brace of your program, include a block comment that includes a sample output of your program. Project 1: Must compile and produce results and include sample Part A: (10 Part B: (10 execution(s) below the last closing curly brace for any points! (Each pts) pts) of these are "UP TO" # points) First point free for each! Comments at top: 1st line includes Project number and program name (5) SHORT Program description in a sentence or two (.5) Input, Processing, and Output Descriptions ( up to 1) @name (name) AND @version (date) (up to.5) Breaks program down: Includes a comment for each of these sections of code WITH blank lines between each part for readability! (up to 1) Includes a declaration section for all variables declarations (5) Includes an input section for prompts and reads (.5) Incudes a separate computation section (.5) Includes a separate output section (5) Program includes description to the user with name! (.5) Program computes correct results: (1) Output matches sample output format (including blank line and dashed lines!): (1) 1. For both parts: Pick an option. 2. Start with the "top comment", especially the Input, Processing and Output to determine your algorithm / plan of attack BEFORE you start your program! 3. THEN, start with your comments! They can be your "skeleton". 4. THEN, write the program, filling in the missing code between the comments. Remember to leave blank lines between each section for readability. 4. Double-check your program to see if it meets all of the requirements 6. Upload the.java file to Canvas. Pick one of Calculating Change Program or Rock, Paper, Scissors Game (Harder): Part B, Option 1: (Financial application: calculating change) Write a program that reads in the total sale and the amount tendered. Both the amount of sale and amount tendered MUST be positive numbers AND the amount tendered must be greater than the amount of sale. Determine the change. Then, determine dollars, quarters, dimes, nickels, and pennies to return to the customer. Hint: The amount owed and amount tendered are each entered as a double. The amounts and the change to return are checked. The change to return is forced to become an integer value. The computations for dollars, quarters, dimes, nickels, and pennies must be determined using integer division and modulus division Example 1: Welcome to Name's Cash Register Program. You will enter the amount owed, and the amount tendered I will compute the change. Enter anount owed: 14.75 Enter anount tendered: 10.00 Total Owed: $14.75 Amount tendered: $10.8 Illegal transaction. Try again. Example 2: Welcome to Name's Cash Register Program. You will enter the amount owed, and the amount tendered. I will compute the change. Enter amount oned: 14.25 Enter amount tendered: -5.00 Total owed: $14.25 Amount tendered: $-5. Illegal transaction. Try again. Example 3: Welcome to Nome's Cash Register Program You will enter the amount owed, and the amount tendered I will compute the change. Enter amount owed: 14.5 Enter amount tendered: 20.00 Totol owed: $14.75 Amount tendered: 520.e Cash back: $5.25 Dollars: 5 Quarters: 1 Dimes: Nickels: a Pennies

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions