Question: Create a Java class named Student with the following attributes: private String lName; private double GPA; private int currentCredits; private int totalCredits; private String fName;

  1. Create a Java class named Student with the following attributes:

private String lName;

private double GPA;

private int currentCredits;

private int totalCredits;

private String fName;

  1. Create a method called objToJSON() in your main application class that creates three instances of your Student class, populates them with data using user input, and write those 3 objects out as JSON to a file called Students.json.
  2. Create a method called displayJSON() in your main application that loads Students.json content and display the contents to standard output. This method should iterate through each student and display properly-formatted output (not raw JSON).
  3. Call the objToJSON() and displayJSON() methods from your main() method.
  4. for this download classpath javax.json-api-1.0.jar and javax.json-1.0.4.jar

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Sure here is an example implementation of the requirements you provided Studentjava public class Student private String name private double GPA privat... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!