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
Write function modifyString(origString, charsToReplace, count) that takes as input a string origString, a string charsToReplace,
laila [671]

Answer:

The code of the above program is provided below. using Python

Explanation:

<u>Code in Python 3:- </u>

def modifyString(origString,charsToReplace,count):

# Make s1 as original string

s1=origString

# Make s2 as charsToReplace string in lowercase

s2=charsToReplace.lower()

# Make s3 as charsToReplace string in uppercase

s3=s2.upper()

# Initialize answer as an empty string

ans=''

# Iterate the string upto length times

for i in range(len(s1)):

# check for chars in the string and append to the answer

if (s1[i] in s2) or (s1[i] in s3):

ans=ans+count*s1[i]

else:

ans=ans+s1[i]

# return the final string

return ans

print(modifyString("Our cat is funny","aeiou",5))    

print(modifyString("Our cat is funny","zu",3))

8 0
3 years ago
Who are The Boys? EddieVR, YourNarrator, JoshDub, Mully, and last but most certainly not least, Juicy(FruitSnacks). Green gang o
malfutka [58]

Answer:

yes or no

Explanation:

6 0
3 years ago
A Windows user is attempting to exit a locked up desktop application that is not responding to mouse or keyboard input. Which of
Kamila [148]

Answer:

Open Task Manager and end the process associated with the application.

Explanation:

When using a computer installed with the Windows Operating system and an application is not responding to the mouse or keyboard input, you can end such application process without exiting other open applications by opening the task manager using the key combinations "CTRL + ALT + DEL". This would open the Task Manager showing all the open application and then you can end the process associated with the application that is not responding.

3 0
4 years ago
PLEASE HELP!!!!!! I NEED THIS NOW!!!!!!!
Sonbull [250]

Answer: I believe it is a web server.

Explanation:

6 0
3 years ago
Read 2 more answers
Don is creating a very long document, and he would like to create an introductory page that contains the title of the document a
satela [25.4K]

Answer:

This is a very good choice, to do so Don can insert a cover page. He can go to the options menu, pick the "insert" lash, and then to the "pages" square in the far left of the toolbox. There he will find a "cover page" section that will automatically add a cover page at the beginning of the document.

Explanation:

The reasons for this answer are that in the first place, it is very difficult to go o the first page of the document and move everything down because the format would be lost. Then, he would require to edit everything. It would also result in the same in case he only added a white page and started writing. So he needs a specific object that wouldn't damage the format if edited on the first page.

6 0
3 years ago
Other questions:
  • What are the example of dedicated computers?
    5·1 answer
  • An example of a current disruptive technology is a?
    9·2 answers
  • If you feel that an OSHA inspection is needed to get hazards corrected at your workplace, which is your best option?
    7·1 answer
  • An engineer's desktop PC connects to a switch at the main site. A router at the main site connects to each branch office through
    5·1 answer
  • What are some types of vehicle technology advancements?
    5·1 answer
  • What limited the possibilities of game development from a technical viewpoint?
    7·1 answer
  • Which act requires that financial institutions must provide a privacy notice to each consumer that explains what data about the
    12·1 answer
  • What are some things you can do to clean up your digital footprint.
    9·1 answer
  • Do like TikTok??????
    14·2 answers
  • When a number gets assigned to a variable that already has a value __________. the new number overwrites the previous value at t
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!