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;
- 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;
- 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.
- 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).
- Call the objToJSON() and displayJSON() methods from your main() method.
- 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
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
Get step-by-step solutions from verified subject matter experts
