Sale!

CSC 210.03 Assignment 2 Selections

$30.00 $18.00

Category: You will Instantly receive a download link for .zip solution file upon Payment || To Order Original Work Click Custom Order?

Description

5/5 - (1 vote)

ABOUT THIS PROJECT

You will be creating a program that will process the scores that a student receives during a driving exam. You will not be creating the driving exam itself. The program is intended to process the scores after the exam has been completed. Program Input: ● The program will ask for the student’s ID number, the written exam score, and the practical exam score. Program Output: ● Then, the overall score will be calculated using a specific formula designed below. ● Once the overall score is computed, the program will let the user know whether or not they passed.

❐Part 1: Driving Exam Evaluator [28 points]

In this project, you will be creating a program that will process the scores that a student receives during a driving exam. You will not be creating the driving exam itself. The program is intended to process the scores after the exam has been completed. The program will ask for the student’s ID number, the written exam score, and the practical exam score. Then, the overall score will be calculated using a specific formula designed below. Once the overall score is computed, the program will let the user know whether or not they passed.

FILE NAME REQUIREMENTS Java file name: DrivingExamEvaluator.java Main class name: DrivingExamEvaluator INSTRUCTIONS 1.Collect the information Your first task is to collect the following information from the user: • The student’s ID number, as a String. The program should validate the input to ensure that it does not exceed 9 characters. If it does, then the program should ignore the user input and automatically set the ID number as a “default” variable integer number, which you declared and assign the value “999999999”;

• The written exam score. See the paragraph below for required validation. • The practical exam score. See the paragraph below for required validation. For both the written exam score and practical exam score, the minimum possible value is 0 and the maximum possible value is 500. For both of these scores, if the user attempts to enter a value that is less than 0, then the program should ignore user input and set the score as 0. If the user attempts to enter a value that is greater than 500, then the program should ignore user input and set the score as 500.

NOTE: This means, that you will have to re-assign the scores to either 0 or 500. Also please print out what the user’s final scores are for both written and practice, AND when you have re-written it so the user know that they provide an invalid score and you had to modify it to stay within the valid values of 0 and 500. 2.Compute the overall score The next step is to calculate the overall score. You do this by taking into account the following weights: • The written exam score makes up 74 percent of the overall score.

• The practical exam score makes up 26 percent of the overall score. You will need to calculate the overall score based on the two scores and their respective weights.

3.Display the summary Finally, you will be displaying the results of the exam to the user. The following results should be displayed: • The student’s ID number. • The written exam score (in terms of percentage). • The practical exam score (in terms of percentage). • The overall score (in terms of percentage).

• A message telling the student if they passed or failed the exam. In order to pass the exam, the student’s overall score must be at least 52 percent of the raw maximum score of 500. If the student does not satisfy this requirement, then that means they fail the exam. The program should be finished once this information is displayed. It is up to you to decide how you would like the information to be displayed. The only requirement is that you present the exact values that are requested above, and the summary must be easy for the user to understand. Aside from that, you can be creative with the design and arrangement of the summary. Output Passing

Output NON Passing

SUBMISSION INSTRUCTIONS

1. Submit the 1 DrivingExamEvaluator.java file directly on iLearn 2. Take a screenshot of the output of your program for passing and non passing and paste it here Output for passing :

Output for not passing :

❐Part 2: Your own idea [10 points] It can be similar to part 1. Please use what you learned from Selections. a. In Assignment 1, Part 3: Your own idea, you created your own idea of a program. For this assignment, you must improve upon your first program by adding what you learned from Selections b. Must include Selections of 2 or more different conditions, using “if”, “else if”, or “if” and “else” c. (Optional) you can use “switch” c. And, must output different results based on the selection to the user d. Must provide an explanation of your idea, and what it is trying to do as I showed in 1 and 2. ex. “This program is to calculate blablabla…” (2 points) FILE NAME REQUIREMENTS .Java

SUBMISSION INSTRUCTIONS 1. Submit the 1 .Java file directly on iLearn 2. Take a screenshot of the output of your program run for all conditions and paste it here Explanation: This is a number guessing game. The execution loop is as follows: 1. The program generates a pseudorandom integer between a certain range (1–100 inclusive, by default). 2. Asks the user for a guess between (1–100 by default). 3. The program checks if the user has selected the correct number by checking the difference between the target number and the user’s guess. The user is given a hint, if: ○ delta > 0, then the number is too high ○ delta < 0, then the number is too low 4. The loop (step 2–3) continues until the user has correctly guessed the number (delta = 0) or

when they have run out of attempts (10, by default). Note: the program does not perform any checks on the input and will crash if an integer is not provided in any part. Example 1: When the user guesses the correct number before they run out of guesses (win) Example 2 and 3 are on the following page.

Example 2: When the user runs out of guesses; fails to guess the right number (loss) Example 3: When the user guesses the correct answer on the last guess (win)

❐Part 3: Comment your code [2 points] Every Java file you write in this assignment will require you to include descriptive comments. In this assignment, you are tasked with writing a descriptive 1. Headers 2. Comments You can write comments in two ways: • Single-line comments using the // notation. • Multi-line comments using the /* and */ notation. a. Include a proper header at the top of every Java file. Figure 1 Header Format /* * Assignment * Description: * Name: * ID: * Class: CSC 210-

* Semester: */ Replace each tag (such as ) with the appropriate text.
You should adhere to this format as closely as possible. You do not need to include the <> symbols in your header fields. b. Only if you work with a Study Buddy, include your Buddy’s name in your header at the top of every Java file. Figure 1 Header Format /* * Assignment * Description: * Name: * Teammate: * ID: * Class: CSC 210-

* Semester: */ Replace each tag (such as ) with the appropriate text. You should adhere to this format as closely as possible. You do not need to include the <> symbols in your header fields. Figure 1
b. Place your comments at the top of each Statement, however you don’t need to comment print (i.e. anything that starts with System.out.print…) statements. An example of commenting codes is included below in Figure 2: Figure 2
❐Part 4: Reflection 50 words [8 points] *Points will be deducted for less than 50 words. Please put what was helpful and what was not helpful in working on this program.
And also please tell me how you would improve your own program from part 3, if you were given more time. Only if you work with a Study Buddy, write down how your buddy helped you, i.e. Don helped me learn a new technique for understanding OOP, by thinking about containers.