JAVA IF/ ELSE, JAVA Programming

Assignment Help:
#This assignment will give you practice with interactive programs, if/else statements and
methods that return values. You are to write a program that prompts the user for information about
two applicants and that computes an overall score for each applicant. This is a simplified version of
a program that might be used for admissions purposes.
Look at the sample logs of execution below to see how your program is to behave. Your program
must exactly reproduce the behavior demonstrated in these logs. For each applicant, we prompt for
exam scores (either SAT or ACT) and actual GPA. The exam information is turned into a number
between 0 and 100 and the GPA information is turned into a number 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 which one looks better or whether they look equal.
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 verbal and SAT math subscores. In
the case of ACT scores, the user is prompted for English, math, reading and science subscores.
These scores are turned into a number between 0 and 100 using the following formulas:
For SAT Scores:
24
2 ? verbal ? math
For ACT Scores:
8.1
2?re?aEdn?mign?salgcitsihehnce
These formulas produce numbers in the range of 0 to 100. After computing this exam score, we
compute a number between 0 and 100 based on the GPA. You will notice that the program prompts
for the GPA and the maximum GPA. Both the GPA and maximum GPA are real values (i.e., they
can have a decimal part). You should turn this into a score between 0 and 100 using the following
formula:
100
max_
_
?
gpa
actugapla
At this point your program has two scores that vary from 0 to 100, one from their test score and one
from their GPA. The overall score for the applicant is computed as the sum of these two numbers
(exam result + gpa result). Because each of these numbers is between 0 and 100, the overall score
for an applicant ranges from 0 to 200.
You do not have to perform any error checking. We will assume that the user enters numbers and
that they are in the appropriate range.
In terms of program style 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). Be sure to once again include a short comment at the beginning of your program as 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).
Your program should be stored in a file called Admit.java. Because your program will be using a Scanner object, you will need to include the following declaration at the beginning of your program:
import java.util.*;
First log of execution (user input underlined)
This program compares two applicants to
determine which one seems like the stronger
applicant. For each candidate I will need
either SAT or ACT scores plus a weighted GPA.
Information for the first applicant:
do you have 1) SAT scores or 2) ACT scores? 1
SAT math? 450
SAT verbal? 530
actual GPA? 3.4
max GPA? 4.0
Information for the second applicant:
do you have 1) SAT scores or 2) ACT scores? 2
ACT English? 25
ACT math? 20
ACT reading? 18
ACT science? 15
actual GPA? 3.3
max GPA? 4.0
First applicant overall score = 147.91666666666666
Second applicant overall score = 135.83333333333331
The first applicant seems to be betterquestion..

Related Discussions:- JAVA IF/ ELSE

How can you performance tune your database?, 1. De normalizes your tables w...

1. De normalizes your tables where required. 2. Proper use of index columns: An index based on numeric parts is more efficient than an index based on character columns. 3. Re

Write a quality and complexity analysis report, In the context of this cour...

In the context of this course work, you are asked to write a quality and complexity analysis report by applying programming design and implementation metrics for the AnagramGame Ja

Explain subclasses and polymorphism, Explain Subclasses and Polymorphism ? ...

Explain Subclasses and Polymorphism ? Car and Motorcycle are subclasses of MotorVehicle. If you instantiate a Car or a Motorcycle along with new, you can use in which object a

Program to create shipping company model, This assignment models a simplifi...

This assignment models a simplified delivery company. It is composed of the following departments:  receiving which contains a list of packages to be delivered, shipping which ship

Questions pseudocodes, 1. Write the pseudocode to get the input of 10 integ...

1. Write the pseudocode to get the input of 10 integers from the user and add them up and output the total. (4 points) 2. Compute the output of following pseudocode. Assume that

Concurrent Programming, Problem 1 A savings account object holds a non-nega...

Problem 1 A savings account object holds a non-negative balance, and provides deposit(k ) and withdraw(k ) methods, where deposit(k ) adds k to the balance, and withdraw(k ) subtra

RatinalAssignment, 1. Make a class Rational to provide at least following m...

1. Make a class Rational to provide at least following methos and constructors: Rational r1= new Rational (3,5); Rational r2= new Rational (4,7); Rational r3=r1.add(r2);

Alreadyboundexception thrown and by which method, When is AlreadyBoundExcep...

When is AlreadyBoundException thrown and by which method? Ans) AlreadyBoundException is thrown by bind(String name) method when a remote object is already registered with the re

Explain the user defined exceptions, Explain the user defined Exceptions. ...

Explain the user defined Exceptions. User Defined Exceptions are the exceptions which are defined by user for specific purposed. This enables custom exceptions to be generated

What is the difference between internet and intranet, What is the differenc...

What is the difference between Internet and Intranet ? Intranet and internet are 2 domains which are extremely a like but frequent segregated in order to manage security. Inter

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd