Create an application that allows you to enter student data that consists of an ID number, first name, last name, and grade point average. Depending on whether the student’s grade point average is at least 2.0, output each record either to a file of students in good standing (located at StudentsGoodStanding.txt) or those on academic probation (located at StudentsAcademicProbation.txt). Enter ZZZ to Quit. This is in Java
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
public class StudentsStanding {
//main method
public static void main(String[] args) throws IOException {
//scaner object to read input from user
java.util.Scanner Sca = new java.util.Scanner(System.in);
File GoodFile=new File("StudentsGoodStanding.txt");
File ProbFile=new File("StudentsAcademicProbation.txt");
FileWriter fp1 = new FileWriter(GoodFile);
FileWriter fp2 = new FileWriter(ProbFile);
String NameFirst;
String NameLast;
int Stud_ID;
double Grad_Avg;
String tempStr1 = "", tempStr2 = "";
while(true){
System.out.println("Enter the student ID: ");
Stud_ID = Sca.nextInt();
System.out.println("Enter the First Name: ");
NameFirst = Sca.next();
System.out.println("Enter the Last Name: ");
NameLast = Sca.next();
System.out.println("Enter the Grade average: ");
Grad_Avg = Sca.nextDouble();
if(Grad_Avg >= 2.0){
tempStr1 = tempStr1 + Stud_ID +"\t"+NameFirst+"\t"+NameLast+"\t"+Grad_Avg+"\n";
}
else{
tempStr2 = tempStr2 + Stud_ID +"\t"+NameFirst+"\t"+NameLast+"\t"+Grad_Avg+"\n";
}
System.out.println("Enter ZZZ to Quit OR press any key to continue");
String MyChoice = Sca.next();
if("zzz".equalsIgnoreCase(MyChoice)){
fp1.write(tempStr1);
fp1.flush();
fp1.close();
fp2.write(tempStr2);
fp2.flush();
fp2.close();
System.out.println("Data stored in File");
break;
}
}
}
}
Create an application that allows you to enter student data that consists of an ID number,...
Create an application that allows you to enter student data that consists of an ID number, first name, last name, and grade point average. Depending on whether the student’s grade point average is at least 2.0, output each record either to a file of students in good standing (located at StudentsGoodStanding.txt) or those on academic probation (located at StudentsAcademicProbation.txt).
create an application that allows the user to enter the gender (either F or M) and GPA for any number of student the application should calculate the average GPA for all student, the average GPA for male students, and the average GPA for female students
Write a C program that allows a user to enter up to 30 student id’s and 3 grades per student. It will then compute and display a report of the students averages, and then a statement of the class average for those grades. The following is a sample run that demonstrates what your program should look like: Please enter your school name: Cape Tech Welcome to the Cape Tech Grade Calculator Enter the number of students to process (0 -...
Create a class named Student, where each Student consists of a student id (a number between 0 and 99999), grade level (1-12), and a full name. Include set and get methods for all fields. Save this as Student.java. Then, write an application that declares a Student object and prompts the user for the three required pieces of information, one at a time. For student id, keep prompting until the user enters a valid number (0-99999). Likewise, keep prompting for a...
In JAVA please! Write program for exercises You will write a Graphical User Interface(GUI) application to manage student information system. The application should allow: 1. Collect student information and store it in a binary data file. Each student is identified by an unique ID. The user should be able to view/edit an existing student. Do not allow student to edit ID. 2. Collect Course information and store it in a separate data file. Each course is identified by an unique...
Java - In NetBeans IDE: • Create a class called Student which stores: - the name of the student - the grade of the student • Write a main method that asks the user for the name of the input file and the name of the output file. Main should open the input file for reading . It should read in the first and last name of each student into the Student’s name field. It should read the grade into...
Graded Exercise Create a class named Student. A Student has fields for an ID number, number of credit hours earned, and number of points earned. (For example, many schools compute grade point averages based on a scale of 4, so a three-credit-hour class in which a student earns an A is worth 12 points.) Include methods to assign values to all fields. A Student also has a field for grade point average. Include a method to compute the grade point...
Shell Programming USA College wants you to create a simple application. The program will enter the student name, student id, Student Level, Enter the marks for four (4) courses. Calculate the total marks and the SGPA. If the SGPA less than 2.0 then students will enter into probation.display the appropriate output.
In Java, Please do not forget the ToString method in the
Student class!
In this exercise, you will first create a Student class. A Student has two attributes: name (String) and gradePointAverage (double). The class has a constructor that sets the name and grade point average of the Student. It has appropriate get and set methods. As well, there is a toString method that prints the student's name and their grade point average (highest is 4.0) You will then write...
In python, Implement a function studentID() which allows the user to enter the 7-digit student ID. The program will keep prompting the user for a last name and first name. If the student does not have a student ID on record, the program will then ask for the student ID, and store that information. If the student already has a student ID, the program will display it, and ask for confirmation whether a new studentID should be assigned (and, if...