Oakland University Java Coding Project

User Generated

wryylWnz

Programming

Oakland University

Description

Please look at the documents I will be submitting this java program must compute the total amount of change when given the number of pennies, nickels , dimes, and quarters.

Unformatted Attachment Preview

Use the following test data for Problem 1: Test Set 1: Pennies = 1 Nickels = 1 Dimes = 1 Quarters = 1 Test Set 2: Pennies = 0 Nickels = 0 Dimes = 0 Quarters = 0 Test Set 3: Pennies = 100 Nickels = 20 Dimes = 10 Quarters = 4 Use the “snipping tool” cut and paste the code into the Word Template Provided on D2L. Please make sure it is large enough to read. Additionally, using the “Snipping tool” cut and paste the output in the same Word document for each test set. Program 1 Write a Java program to compute the total amount of change when given the number of pennies, nickels, dimes, and quarters. Specifically, A. Display “Your Name” B. Display “Project_1 Problem_1\n" C. Display “This program computes the total amount of change when given the number of pennies, nickels, dimes, and quarters” D. Declare P, N, D, and Q as int E. Declare Total as double F. Initialize P, N, D, Q and Total = 0 G. P = Prompt the User to “Enter the number of pennies” H. N = Prompt the User to “Enter the number of nickels\n” I. D = Prompt the User to “Enter the number of dimes\n” J. Q = Prompt the User to “Enter the number of quarters\n" K. Total = 0.01* P + 0.05*N + 0.1*D + 0.25*Q L. Display “\nTotal is “ + Total Note: Do not worry about the number of decimal places – We will address this in Chapter 3 ¡GRASP Wedge2 Hit any key to start. Professor O'Connor Project_1 Problen_1 This program computes the total amount of change given the number of pennies, nickles, dimes, and quarters Enter the number of pennies 1 Enter the number of nickles 2 Enter the number of dines 3 Enter the number of quarters 4 The total is $1.4100000000000001 Hit any key to continue. Use the following test data for Program 2: Test Set 1: Score_1 = 0 Score_2 = 0 Score_3 = 0 Test Set 2: Score_1 = 80 Score_2 = 90 Score_3 = 100 Test Set 3: Score_1 = 110 Score_2 = 104 Score 3 = 88 Program 2 Write a Java program to compute the average of student's three test scores. Specifically, A. Display “Your Name” B. Display “Project_1 Problem_2" C. Display “This program computes the average of student's three test scores” D. Declare each variable as double E. Ave_Score = 0 F. Score_1 = 0 G. Score 2 = 0 H. Score_3 = 0 1. Score_1 = Prompt the User to “Enter the student's first test score" J. Score_2 = Prompt the User to “Enter the student's second test scoreln” K. Score_3 = Prompt the User to “Enter the student's third test score\n" L. Ave_Score = (Score_1 + Score_2 + Score_3)/3 M. Display “InYour test scores are:” N. Display “ItTest 1 = " + Score_1 O. Display “ItTest 2 = “ + Score_2 P. Display “ItTest 3 =“ + Score_3 Q. Display “InAverage test score is” + Ave_Score х ¡GRASP Wedge2 Hit any key to start. Professor O'Connor Project_1 Problem_2 This program computes the average of student's three test scores Enter first test score 75 Enter second test score 80 Enter third test score 90 Your test scores are: Test Score 1 = 75.0 Test Score 2 = 80.0 Test Score 3 = 90.0 Average test score is 81.66666666666667 Hit any key to continue.
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

But wait, I did not upload...


Anonymous
Excellent resource! Really helped me get the gist of things.

Studypool
4.7
Indeed
4.5
Sitejabber
4.4

Related Tags