Create a Java class named Student with the following attributes: private String lName; private double GPA; private
Fantastic news! We've Found the answer you've been seeking!
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 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
Related Book For
Java How To Program Late Objects Version
ISBN: 9780136123712
8th Edition
Authors: Paul Deitel, Deitel & Associates
Posted Date: