Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

enriver.edu/courses/1874779/assignments/16958914 .com: Chea... Walmart TripAdvisor A Facebook This assignment will give you practice with interactive programs, if/else statements and methods that return values. Your program

image text in transcribedimage text in transcribed

enriver.edu/courses/1874779/assignments/16958914 .com: Chea... Walmart TripAdvisor A Facebook This assignment will give you practice with interactive programs, if/else statements and methods that return values. Your program will prompt the user for information about two applicants and compute an overall score for each applicant. This is a simplified version of a program that might be used for admissions purposes. The sample log of execution indicates how your program is to behave. For each applicant, we prompt for exam scores (either SAT or ACT) and overall GPA. The exam and GPA information is turned into numbers between 0 and 100 and these two scores are added together to get an overall score between 0 and 200. After obtaining scores for each applicant, the program reports how they compare. Notice that the program asks for each applicant whether to enter SAT scores or ACT scores (SAT scores are integers that vary between 200 and 800. ACT scores are integers that vary between 1 and 36). In the case of SAT scores, the user is prompted for SAT math, reading and writing scores. In the case of ACT scores, the user is prompted for English, math, reading and science scores. These scores are turned into a real-valued number between 0 and 100 using the following formulas. For SAT Scores: 2.mathreading tuiting For ACT Scores. English+2-math reading science After computing this exam score, we compute a number between 0 and 100 based on the GPA. The program prompts the user for the GPA, and a transcript multiplier. Both of these are positive real values i.e. they can have a decimal part). The transcript multiplier is a value between 0.8 and 10 that the admissions staff use to account for differences across students and across schools. For example, a student who takes more AP courses or a student who comes from a high school that is known to have tough grading standards will get a higher transcript multiplier. You should turn this into a score between 0 and 100 using the following formula: adal PA .transcript Multiplier 3 G m: Chea. Walmart TripAdvisor F acebook At this point your program has two scores that vary from 0 to 100, one from test scores and one from GPA. The overall score for the applicant is computed as the sum of these two numbers (exam result + spa result). Because each of these numbers is between O and 100, the overall score for an applicant ranges from 0 to 200. As indicated in the sample log of execution, your program is to report the exam and GPA subscores and the overall score for each applicant. These should be rounded to one decimal place when displayed. You are required to do this using the printf statement described in section 4.3 of the textbook (the alternative is to have redundant expressions throughout your code, which would be bad style). In addition to reporting the score for each applicant, the program should also produce whichever of the following messages is appropriate: The first applicant seems to be better . The second applicant seems to be better The two applicants seem to be equal You do not have to perform any error checking. We will assume that the user enters numbers that are in the appropriate range. Even though your program is rounding numbers to one decimal place when they are displayed, it should not round the numbers that are used to compute results and to compare scores. This can lead to some confusing output. For example, if the examsubscore is 84.06 and the GPA subscore is 6278, then they add up to 146.84. But rounding the displayed numbers to one digit, these would be displayed as 84.1 plus 628 adding up to 146.8. This is the correct output to produce even though it doesn't seem to add up properly. You should use static methods to eliminate redundant code and to break the problem up into logical subtasks. Your main method should be short so that a person can easily see the overall structure of the program. You are to introduce at least five static methods other than main to break this problem up into smaller subtasks and you should make sure that no single method is doing too much work In this program, none of your methods should have more than 15 lines of code in the body of the method (not counting blank lines or lines with just curly braces on them. The 15-line limitation is a special requirement for this assignment because I want you to practice breaking up a program into methods. Be sure to once again include a short comment at the beginning of your programas well as a short comment for each method describing what it does. Also remember that because this program involves both integer data and real data, you need to use appropriate type declarations (type int and calls on nextInt for integer data, type double and calls on nextDouble for real-valued data) O e G enriver.edu/courses/1874779/assignments/16958914 .com: Chea... Walmart TripAdvisor A Facebook This assignment will give you practice with interactive programs, if/else statements and methods that return values. Your program will prompt the user for information about two applicants and compute an overall score for each applicant. This is a simplified version of a program that might be used for admissions purposes. The sample log of execution indicates how your program is to behave. For each applicant, we prompt for exam scores (either SAT or ACT) and overall GPA. The exam and GPA information is turned into numbers between 0 and 100 and these two scores are added together to get an overall score between 0 and 200. After obtaining scores for each applicant, the program reports how they compare. Notice that the program asks for each applicant whether to enter SAT scores or ACT scores (SAT scores are integers that vary between 200 and 800. ACT scores are integers that vary between 1 and 36). In the case of SAT scores, the user is prompted for SAT math, reading and writing scores. In the case of ACT scores, the user is prompted for English, math, reading and science scores. These scores are turned into a real-valued number between 0 and 100 using the following formulas. For SAT Scores: 2.mathreading tuiting For ACT Scores. English+2-math reading science After computing this exam score, we compute a number between 0 and 100 based on the GPA. The program prompts the user for the GPA, and a transcript multiplier. Both of these are positive real values i.e. they can have a decimal part). The transcript multiplier is a value between 0.8 and 10 that the admissions staff use to account for differences across students and across schools. For example, a student who takes more AP courses or a student who comes from a high school that is known to have tough grading standards will get a higher transcript multiplier. You should turn this into a score between 0 and 100 using the following formula: adal PA .transcript Multiplier 3 G m: Chea. Walmart TripAdvisor F acebook At this point your program has two scores that vary from 0 to 100, one from test scores and one from GPA. The overall score for the applicant is computed as the sum of these two numbers (exam result + spa result). Because each of these numbers is between O and 100, the overall score for an applicant ranges from 0 to 200. As indicated in the sample log of execution, your program is to report the exam and GPA subscores and the overall score for each applicant. These should be rounded to one decimal place when displayed. You are required to do this using the printf statement described in section 4.3 of the textbook (the alternative is to have redundant expressions throughout your code, which would be bad style). In addition to reporting the score for each applicant, the program should also produce whichever of the following messages is appropriate: The first applicant seems to be better . The second applicant seems to be better The two applicants seem to be equal You do not have to perform any error checking. We will assume that the user enters numbers that are in the appropriate range. Even though your program is rounding numbers to one decimal place when they are displayed, it should not round the numbers that are used to compute results and to compare scores. This can lead to some confusing output. For example, if the examsubscore is 84.06 and the GPA subscore is 6278, then they add up to 146.84. But rounding the displayed numbers to one digit, these would be displayed as 84.1 plus 628 adding up to 146.8. This is the correct output to produce even though it doesn't seem to add up properly. You should use static methods to eliminate redundant code and to break the problem up into logical subtasks. Your main method should be short so that a person can easily see the overall structure of the program. You are to introduce at least five static methods other than main to break this problem up into smaller subtasks and you should make sure that no single method is doing too much work In this program, none of your methods should have more than 15 lines of code in the body of the method (not counting blank lines or lines with just curly braces on them. The 15-line limitation is a special requirement for this assignment because I want you to practice breaking up a program into methods. Be sure to once again include a short comment at the beginning of your programas well as a short comment for each method describing what it does. Also remember that because this program involves both integer data and real data, you need to use appropriate type declarations (type int and calls on nextInt for integer data, type double and calls on nextDouble for real-valued data) O e G

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

More Books

Students also viewed these Databases questions

Question

What is a gigapop?

Answered: 1 week ago