Posted: June 25th, 2022

BN108D Programming For Networking

Question:

To see how your program should behave, take a look at the execution logs.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

These logs must be replicated in your program.

We ask for applicants’ exam scores (SAT/ACT) as well as their overall GPA.

The exam data is converted into a number between 100 and 100, and the GPA information into a number of 0 to 100. These two scores are combined to give an overall score between zero and 200.

The program then reports on which applicant looks better or more equal after obtaining scores.

Save Time On Research and Writing
Hire a Pro to Write You a 100% Plagiarism-Free Paper.
Get My Paper

The program asks applicants whether they want to enter SAT scores and ACT scores. SAT scores are integers that range between 200 and 800. ACT scores are integers ranging between 1 and 36.

For SAT scores, the user will be asked for SAT verbal or SAT math subscores.

ACT scores are prompted to provide subscores for English, math and science.

The following formulas are used to convert these scores into numbers between 0 and 100.

These formulas give us numbers from 0 to 100.

Based on your GPA, we calculate a number between 0 to 100 after computing the exam score.

The program will prompt you to enter your maximum GPA and GPA.

The maximum GPA and GPA can both be real numbers (e.g., they can include a decimal part).

The following formula will convert this score into a score between zero and 100:

Your program now has two scores, one based on the applicant’s test score and one based on their GPA.

The applicant’s overall score is the sum of these numbers (exam results + gpa results).

Each of these numbers can be between 0 and 100 so the applicant’s overall score will range from 0 to 200.

There is no need to do any error checking.

We assume that the user entered numbers and that they fall within the correct range.

Static methods are best for removing redundant code and breaking down the problem into smaller, more manageable tasks.

The main method should be concise so that the user can see the overall structure.

To break down the problem into smaller tasks, you will need to include at least five static methods. You should also ensure that each method does not do too much.

You must not have more than 15 lines code in your method body (this does not include lines that are blank or with curly braces).

Remember to include a brief comment at the start of your program and a comment for each method that describes what it does.

Remember that this program can handle real and integer data. You need to use the appropriate type declarations. Type int and calls upon nextInt for integer data; type double and calls onto nextDouble if you are dealing with real-valued data.

Your program should be saved in a file called MITnnnnnnAdmit.java. MITnnnnnnnnnnnnnnnnnnnnnnnnnnnnnn where MITnnnnnnnnnnnnnnnnnnnnnnnnnnnN is your MIT student identification.

The following declaration should be included at the start of your program because it will use a scanner object.

Answer:

Import java.util.Scanner

* MIT170671.java – A program that asks for information about two

* applicants, and that calculates an overall score per applicant

public class MIT170671

* This method takes the input of the user and returns the total exam score

* to take the SAT exam

* @param scan

* To take the input, use the scanner object

* @return score for SAT exam

Public static double getSatScore (Scanner scan).

int math = scan.nextInt()

int verbal = scan.nextInt()

Double overallGPA = scan.nextDouble()

Return (satScore + GPAScore);

* This method takes the input of the user and returns the total exam score

* to take the ACT exam

* @param scan

* To take the input, use the scanner object

* @return score for ACT exam

Public static double getActScore (Scanner scan).

int math = scan.nextInt()

int reading = scan.nextInt()

int science = scan.nextInt()

Double overallGPA = scan.nextDouble()

Return (actScore + GPAScore);

* To calculate your SAT score, use the following condition.

* Marks of verbal subject

* @param math

* Marks for math subjects

* @return calculated SATScore

* Use the following condition to calculate your ACT score.

* Marks of English Subject

* @param math

* Marks for math subjects

* @param reading

* Marks of reading

* Marks of science subject

* @return calculated by ACTScore

* Use the following condition to calculate your GPA score.

* @param maxGPA

* @param overallGPA

* The user provides the GPA

* @return calculated by GPAScore

Return (overallGPA/maxGPA) = 100

* This will allow you to compare scores that have been passed as arguments.

* prints the appropriate output to the console.

* @param FirstApplicantScore

* Score of the first applicant

* @param 2ndApplicantScore

* Score of the second applicant

or else

* To obtain the first Applicant Score.

The corresponding application fee will be determined based on your choice.

* Method is used for SAT and ACT.

* @param scan

* To take the input, use the scanner object

* @return score for the first applicant

Double firstApplicantScore = 0.

int choice = scan.nextInt()

If (choice == 1),

other if (choice == 2)

Return firstApplicantScore

* To obtain the second Applicant Score.

The corresponding score will be determined based on your choice.

* Method is used for SAT and ACT.

* @param scan

* To take the input, use the scanner object

* @return score for the second applicant

Double secondApplicantScore = 0.

int choice = scan.nextInt()

If (choice == 1),

other if (choice == 2)

* Execution starts here.

Calculated scores for the first and second applicants are

* and printed on the console.

* @param “args”

public static void main (String[]args)

Scanner scan = New Scanner (System.in);

[1] K. Sierra, B. Bates Head First Java, 1st ed.

[2] H. Schildt Java: The Complete Reference 9th Edition.

Expert paper writers are just a few clicks away

Place an order in 3 easy steps. Takes less than 5 mins.

Calculate the price of your order

You will get a personal manager and a discount.
We'll send you the first draft for approval by at
Total price:
$0.00
error: Content is protected !!
Open chat
1
Order through WhatsApp!
affordablepaperwritings.com
Hello!
You Can Now Place your Order through WhatsApp
 

 

Order your essay today and save 30% with the discount code DISCOUNTS2022