Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

Sure here is an example implementation of the requirements you provided Studentjava public class Student private String name private double GPA privat... blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Java How To Program Late Objects Version

Authors: Paul Deitel, Deitel & Associates

8th Edition

0136123716, 9780136123712

More Books

Students also viewed these Programming questions

Question

Graph one period of each function. y = 4 cos x

Answered: 1 week ago