For the upcoming Fall 2016 term, the 1ST department needs you to create a progra
ID: 3672870 • Letter: F
Question
For the upcoming Fall 2016 term, the 1ST department needs you to create a program that helps non-IT majors determine if they are eligible to transfer to the IT major and possibly receive a transfer scholarship. The department will allow up to 27 students to transfer to the IT major. Eligibility is based on current GPA and if the student completed IT 106. Students that have not completed IT 106 with a grade of "C" or better are ineligible to transfer. For students that have completed IT 106 with a grade of "C" or better, they must have earned at least a 3.0 GPA to transfer. Students with a GPA of 3.6 or higher are eligible to transfer and awarded a $2,060 scholarship. Students with a GPA between 3.4, but less than 3.6 are eligible to transfer and awarded a $1,060 scholarship. Students with a GPA less than 3.4 are eligible to transfer, but not awarded a scholarship. Write a program that will allow a user to enter students until the user has indicated they are finished entering students or the maximum number of students eligible to transfer to the IT major has been reached (whichever comes first). The program must allow a user to enter student names, GPAs, and if the student has completed IT 106 with a grade of "C" or better, one student at a time. The program must notify the user about the student's transfer acceptance or non-acceptance to the IT major and the scholarship amount (if any). Once the user has completed entering student information, the program must provide a well-formatted report containing the number of students entered, the number of students eligible to transfer to the IT major, and the total scholarship money awarded.Explanation / Answer
Java programming: Java program code consists of instructions which will be executed on your computer system to perform a task as an example say arrange given integers in ascending order. This page contains examples for beginners to understand how to use java programming to write simple Java programs. These codes demonstrate how to get input from user, working with loops, strings and arrays. Programs are provided with output (image file) and you can also download class file and execute it directly without compiling the source file.
Compiling and executing java programs
Java programming software: To compile and run Java program code you need to download JDK (Java Development Kit).
To compile type: javac file_name.java where file_name is name of file containing java source code.
Javac is the Java compiler which converts java code into bytecode.
To run type: java main_method_class where main_method_class is the name of class which defines main method.
import java.io.*;
class Student
{
int rollno;
String name,grade;
float gpa;
Student(int roll,String stud_name,String grade,double gpa)throws IOException
{
rollno=roll;
name=stud_name;
grade = this.grade;
gpa= this.gpa;
getInfo(grade,gpa);
}
public void getInfo(grade,gpa)
{
String grade;
float gpa;
if (grade == "C")
{
if(gpa>=3.6)
{
System.out.println(“Eligible to transfer “);
System.out.println(“Awarded a scholarship of $2,060“);
}
else if (gpa<3.6 || gpa>=3.4)
{
System.out.println(“Eligible to transfer “);
System.out.println(“Awarded a scholarship of $1,060“);
}
else if (gpa<3.4 || gpa>=3.0)
{
System.out.println(“Eligible to transfer “);
System.out.println(“Awarded a scholarship of “);
}
else
System.out.println("Not eligible to transfer");
}
}
class StudentDemo
{
public static void main(String args[])throws IOException
{
int rno,no,nostud;
String name,grade;
float gpa;
Scanner scan = new Scanner( System.in );
BufferedReader br= new BufferedReader (new InputStreamReader(System.in));
System.out.println(“Enter How many Students:=> “);
nostud=Integer.parseInt(br.readLine());
Student s[]=new Student[nostud];
for(int i=0;i<nostud;i++)
{
System.out.println(“Enter Roll Number:=> “);
rno=Integer.parseInt(br.readLine());
System.out.println(“Enter Name:=> “);
name=br.readLine();
System.out.println(“Enter Your Grade:=> “);
grade=br.readLine();
System.out.println(“Enter GPA:=> “);
gpa=scan.nextDouble();;
s[i]=new Student(rno,name,grade,gpa);
}
System.out.println(“Number of Students:=> “+nostud);
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.