1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
yaroslaw [1]
3 years ago
12

Create an application named StudentsStanding.java that allows you to enter student data that consists of an ID number, first nam

e, last name, and grade point average. Have the program accept input until ZZZ is entered for the ID number. 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 or those on academic probation. Create an application named StudentsStanding2.java that displays each record in the two files created in the StudentsStanding application. Display a heading to introduce the list produced from each file. For each record, display the ID number, first name, last name, grade point average, and the amount by which the grade point average exceeds or falls short of the 2.0 cutoff.
Computers and Technology
1 answer:
Artemon [7]3 years ago
8 0

Answer:

Answers can be found below

Explanation:

import java.io.*;

import java.util.Locale;

import java.util.Scanner;

public class StudentStanding {

      public static void main(String[] args) throws IOException {

            BufferedReader bufferedReader = new BufferedReader(new

InputStreamReader(System.in));

Scanner scanner = new Scanner(System.in).useLocale(Locale.US);

            boolean isWorking = true;

            while (isWorking) {

                    System.out.print("ID: ");

                    int id = scanner.nextInt();

                    System.out.print("First name: ");

                    String firstName = bufferedReader.readLine();

                    System.out.print("Last name: ");

                    String lastName = bufferedReader.readLine();

                    System.out.print("Grade point average: ");

                    double gradePointAverage = scanner.nextDouble();

                    System.out.println("Student " + firstName + " " + lastName +

                         " with ID " + id + " have " + gradePointAverage + " grade

point average.");

                    if (gradePointAverage >= 2.0) {

                       BufferedWriter out = new BufferedWriter(new

FileWriter("D:\\GoodStanding.txt", true));

                        out.write("ID: " + Integer.toString(id));

                        out.newLine();

                        out.write("First name: " + firstName);

                        out.newLine();

                        out.write("Last name: " + lastName);

                        out.newLine();

                        out.write("Grade point average: " +

Double.toString(gradePointAverage));

                         out.newLine();

                         out.newLine();

                         out.close();

                         System.out.println(firstName + " " + lastName + " have grade

point average > 2.0");

                         System.out.println("This student was saved to

GoodStanding.txt");

} else {

BufferedWriter out = new BufferedWriter(new

FileWriter("D:\\AcademicProbation.txt", true));

out.write("ID: " + Integer.toString(id));

out.newLine();

out.write("First name: " + firstName);

out.newLine();

out.write("Last name: " + lastName);

out.newLine();

out.write("Grade point average: " +

Double.toString(gradePointAverage));

out.newLine();

out.newLine();

out.close();

System.out.println(firstName + " " + lastName + " have grade

point average < 2.0");

                    System.out.println("This student was saved to

AcademicProbation.txt");

          }

           System.out.println("Continue? y ­ yes, n ­ no.");

           System.out.print("Answer: ");

           String answer = bufferedReader.readLine();

           if (answer.equals("y")) {

System.out.println("");

} else if (answer.equals("n")) {

scanner.close();

isWorking = false;

                         }

                     }

                System.out.println("Finished");

       }

}

You might be interested in
A word that has a specific, predefined meaning in a programming language is called
vampirchik [111]
<span>The correct answer is


A keyword</span>
5 0
4 years ago
How does a fully integrated Data and Analytics Platform enable organizations to convert data into consumable information and ins
loris [4]

Answer: How are you

Explanation:como estas meaning

3 0
3 years ago
Premiere Pro CS4 is the first version to be optimized for _______operating systems, although it is not natively 64-bit.
blondinia [14]
64-bit, according to the product description, and other sources.


7 0
3 years ago
2.13.4 Colorful Caterpillarhel ????
exis [7]

Answer:

sorry don't know :(8685

3 0
3 years ago
Do you think people are willing to buy these products? Why?
SSSSS [86.1K]
What products ma’am/sir
3 0
3 years ago
Read 2 more answers
Other questions:
  • What is a fragment shader? Question 5 (3 marks) What is trilinear filtering?
    8·1 answer
  • Naseer has inserted an image into his document but needs the image to appear on its own line.
    14·2 answers
  • What are the nicknames for the first generation computers
    8·1 answer
  • Bushman and bonacci (2004) found that prejudiced participants were ____ likely to return a lost e-mail that had been addressed t
    5·1 answer
  • The width of a strand of fiber is 19.2 micrometers. if 1500 strands are adhered side by side, how wide would the resulting fabri
    9·1 answer
  • 7) The small slots on the front, back, or side of your computer that allow you to connect devices (such as a keyboard, mouse, or
    11·1 answer
  • When registering online for your classes you log onto to a website provided by your university. The computer and web browser tha
    6·2 answers
  • Where is the best place to self learn c++ or c# that is free?
    6·2 answers
  • Python;
    6·1 answer
  • State four reasons why office automation is adopted in business establishment?​
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!