Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Introduction to JAVA homework please help. See picture for requirements. picture

ID: 3886779 • Letter: I

Question

Introduction to JAVA homework please help. See picture for requirements.

picture urlhttp://chuantu.biz/t6/54/1505785448x2328494481.png

Following is the 1st skeleton code.

///////////////////////////////

}

//////////////////////////////

Then the 2nd skeleton code:

//////////////////////

}

////////////////////////////

package hw5; public abstract class Don implements Comparable{ //TODO: Replace with your code.

}

//////////////////////////////

Then the 2nd skeleton code:

//////////////////////

package hw5; import com.google.gson.JsonObject; /** * A class with a static method to return a new Don based on the * input JsonObject. * */ public class DonBuilder { /* // Undergraduate { "name":"Jenny", "id":20398776, "gpa":3.4, "year":"Junior" } //Graduate { "name":"Jenny", "id":20398776, "gpa":3.4, "undergrad_uni":"Mills College" } //Faculty { "name":"Jenny", "id":20398776, "salary":108765 } */ /** * Construct an object of type Don. * The method should determine the type of object to instantiate based on the * schema of the JsonObject. * Above are examples of the schemas for Undergraduate, Graduate, and Faculty. * * name must be a String * id must be a whole number * gpa must be a double * undergrad_unit must be a String * salary must be a whole number * * The method will return null if any items are missing or if the value * associated with a key is not of the correct type. * * @param donJson * @return */ public static Don buildDon(JsonObject donJson) { //TODO: Replace with your code. return null; }

}

////////////////////////////

Homework 5 Due Friday, September 22, 2017-5:00PM In this homework, you will practice using the following Inheritance JSON The test cases for this homework will not compile until you have implemented the classes specified below. SON For this assignment, you will first need to familiarize yourself with Javascript Object Notation (JSON) and the GSON APL. Please refer to the in-class code examples for more information. Requirements You will implement objects to represent the following types of people associated with USF: Undergraduate, Graduate, and Facult Undergraduate The following JSON document represents an undergraduate student An undergraduate must have all four elements show in the document below. "name": "Jenny", id":28398776 gpa":3.4, year": "Junior Graduate The following JSON document represents an graduate student. A graduate must have all four elements show in the document below "name": Jenny", id":28398776, gpa":3.4, "undergrad_uni": "Mills College" Faculty The following JSON document represents a faculty member. A faculty member must have all four elements show in the document below "name": "Jenny" "id":28398776, "salary":188765 Base Classes All types of people derive from Donthe base class provided for you. This abstract dass is also comparable , which means it must implement a compareTo method. Don objects are sorted alphabetically by their name .If two Don objects have the same name then they are sorted by id, smallest to largest. Undergraduate and Graduate are also Student Make sure that Don stores any data common to all people, and that student stores data common to both Graduate and Undergraduate DonBuilder The buildoon method of DonBuilder will take as input a Jsonobject formatted as described above and will instantiate and return the appropriate subclass. The type of object instantiated will be dependent upon the elements contained in the Jsonobject. Make sure to do appropriate error checking as described in the method javadoc. Other requirements Your grade will depend upon whether you pass the test cases as well as on how well you use Java inheritance mechanisms. 1. Make sure to use abstract classes and/or methods where appropriate. 2. Make sure to use the private/public/protected keywords appropriately Submission Requirements 1. Use the following link to create your private github repository for this assignment. The repository will be seeded with the skeleton code, test cases, and input files. Homework 5 2. For full credit, make sure to follow all Style Guidelines. Points will be deducted for each violation. Grading Rubric Points Criterion Description testUndergraduate testGraduate testFaculty testUndergradInheritsStudent testGradInheritsStudent testinvalidTypeForld testMissingld testInvalidTypeForSalary testCompareTo Design St Code passes all test cases. Code passes all test cases. Code passes all test cases. Code passes all test cases. Code passes all test cases. Code passes all test cases. Code passes all test cases. Code passes all test cases. 4 4 e passes all test cases Code is well designed and follows all specifications. Code follows all style guidelines. 10 Partial credit may be awarded for partial functionality and/or partially correct design or style elements. Academic Dishonesty Any work you submit is expected to be your own original work. If you use any web resources in developing your code you are required to cite those resources. The only exception to this rule is code that is posted on the dass website. The URL of the resource you used in a comment in your code is fine. If I google even a single line of uncited code and find it on the internet you may get a 0 on the assignment or an F in the class. You may also get a 0 on the assignment or an F in the class if your solution is at all similar to that of any other student.

Explanation / Answer

//Don.java

==================================================================================

//DonBuilder.java

===================================================================================

//Faculty.java

============================================================================

//Graduate.java

==================================================================================

//Student.java

================================================================================

//Undergraduate.java

================================================================================

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote