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
3. What is a web directory? What are the key differences between web directories
MrMuchimi

Answer:

web directories are much smaller and more specific than search engines

3 0
2 years ago
A ____ is a software program that is designed to cause damage to a computer or perform some other malicious act.
Dafna11 [192]
Computer virus, a software program that is designed to cause damage to the computer system or perform some other
malicious act
5 0
2 years ago
In early PCs, a DIMM in any one of the DIMM slots could fill the 64-bit bus; therefore, each slot was called a(n) ______________
Svetach [21]

Answer:

The correct answer to the following question will be Option A (Bank).

Explanation:

  • Sometimes on a motherboard, the memory modules are grouped into different groups and that each group is named as a branch. Furthermore, the term "bank" may be used loosely to describe a basic computing data storage area. When the record is stored in the database it can be accessed at a specific time by the user.
  • Because the 486 is a 32-bit processor and a 30-pin SIMM is 8-bit, four SIMMs (8x4=32) is called a bank when installing memory on an 80486 processor computer; Install four 16 MB SIMMs when upgrading to 64 MB. 

Therefore, Option A is the right answer.

3 0
3 years ago
How do you change your age on here? I accidentally put that i was 15 but i am only 13. How do I change this?
oksano4ka [1.4K]
I honestly don't think they can or just change your account from what I know of I just tried just now to see for you. I think you jus gotta leave it lol. I'm 13 too I lit myself 16
5 0
3 years ago
How do you make someone brainlest
HACTEHA [7]

Answer:

When you ask a question, people have to option to responds and when you have two different users respond on your question, there is the option to give one of them the Brainliest award for the best answer.

Hope this Helps!

4 0
3 years ago
Read 2 more answers
Other questions:
  • Questions 6 - 9 Refer to the following code: public class WhatsIt { private int[] values; private double average; public WhatsIt
    7·1 answer
  • PriQueue inherits from Queue. In the implementation of the getMax() method in the PriQueue class, we need to read and write the
    5·1 answer
  • A concave lens is also called a diverging lens. please select the best answer from the choices provided t f
    6·1 answer
  • Filtering removes data from the spreadsheet. A. True B. False
    9·2 answers
  • Which question is most closely related to the field of biology? A.How thick is a paper bag? B.What determines the growth rate of
    10·2 answers
  • I need to figure out exactly how to make this figure while coding.
    6·1 answer
  • What correctly describes the features of the service called kickstarter?
    14·2 answers
  • Why wouldn't a game using just run-length encodings be challenging?
    9·1 answer
  • In this era of technology, everyone uses emails for mail and messages. Assume you have also used the
    6·1 answer
  • A classic game, Wario Land, has an invincible main character who reacts to the environment in order to solve puzzles. So, for ex
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!