Programming
ACS 1904 University of Manitoba JAVA Program Project

ACS 1904

University of Manitoba

ACS

Question Description

I need an explanation for this Java question to help me study.

Hlo

Steps are mentioned in PDF File.

To Make it Easier Everything is mentioned in pdf file. But if you have any ques Message me anytime.

Requirements for Program Files

** Parts are to be completed that are Highlighted in Hierarchical Diagram.

**Create constructors, setters and Getters for each .java File

** Use java.util.Arrays library file.

** To handle the XML file code use java.beans.XMLEncoder plus java.io.FileOutputStream ( readObject() , writeObject() methods

** To handle the exceptions use java.io.IOException

** try, catch ,Finally be used in code for exceptions

Unformatted Attachment Preview

ACS-1904-002 Assignment #3 Due by Wednesday March 25th at 11:59 pm - Submit your .java files (together in an As3.zip file) via Nexus - Include your name and student number in each file as a comment UML diagram: Note that this assignment requires reading/writing data to/from XML files. Encoding/decoding XML has requirements that need to be fulfilled: - All classes in the object graph must include an empty-arg constructor and all getters and setters PART A: 1. Create the Hierarchical Class structure shown in Section A of the UML diagram. Note that: - Person is an abstract class with toString overridden to display names in the format , e.g. Potter, Harry - Student implements the Comparable interface (from the Java Class Library), Student objects have a natural ordering by last name then first name (see output in A-3 below) 2. Implement the associations in the following manner: a. When a student adds a course, the corresponding class list is updated (student is added). The course list defaults to alphabetical ordering and updates with every new student added. Use Collections.sort to achieve this. b. When an instructor is assigned to a course, the course is added to their teaching list Note: The this keyword can be passed as an argument in the method call: use this to set the second part of these associations. 3. Download the As3A_Driver from Nexus that instantiates the following objects: Students: Name Year GPA Harry Potter 2 3.65 Ron Weasley 2 2.21 Hermione Granger 2 4.5 Cho Chiang 3 4.05 Ginny Weasley 1 3.9 Instructors: Name Degree Severus Snape Ph.D. Minerva McGonigal M.Sc. As3A_Driver also instantiates and populates an array list of Person objects, creates instances of Instructors and courses and applies the associations. Running this code should display the following output: WIZ-2666 Potions II Instructor: Severus Snape, M.Sc. Students: Chiang, Cho Granger, Hermione Potter, Harry Weasley, Ron WIZ-2989 Transfiguration Instructor: Minerva McGonigal, Ph.D. Students: Granger, Hermione Potter, Harry Weasley, Ginny Weasley, Ron Complete the driver code: a. Write the people array list to an XML file called As3-people.xml. Include a message confirming that the file has been written to. b. Write both courses to an XML file called As3-courses.xml. Include a message confirming that the file has been written to. PART B 1. Create the StudentRegistrationComparator class that implements the Comparator interface (from the Java Class Library). The alternate ordering of students for registration is by highest year number (i.e. 3rd year students are ordered before 2nd year), and within the same year number students are ordered by highest GPA. 2. In As3B_Driver, read in the data from As3-people.xml. Create a new array list of Student objects named students. Iterate through people and add only objects of type Student to the list. 3. Sort these students to be ordered for registration and display the output in the following manner using the Student getInfo() string for display: Registration order: Chiang, Cho: year 3, GPA: 4.0 Granger, Hermione: year 2, GPA: 4.5 Potter, Harry: year 2, GPA: 3.65 Weasley, Ron: year 2, GPA: 2.2 Weasley, Ginny: year 1, GPA: 4.2 4. Write the students array list to a file named As3-students.xml. Include a message confirming that the file has been written to. PART C: Continue to develop the program to include membership to the university's fitness facility. 1. Create the FitnessFacility class and the GymMember interface and make any changes to the Person class so that Person objects can be members of the gym. a. Add necessary features suggested for FitnessFacility such as a name, a method to add a member, and a method to display the gym info and names of its members. b. Include a static variable lastNumber that is used to assign member numbers to new members: when a member is added, assign the next member number of the GymMember (in sequence starting at 1000). 2. Implement a Driver (As3C_Driver) class with a main method that a. Reads the contents of As3-courses.xml and stores the first object as a Course. b. Assigns the instructor and each student in this course a gym membership c. Displays the list of gym members d. Writes the FitnessFacility object to an XML file called As3gyminfo.xml. Include a message confirming that the file has been written to. Sample output: Name: The Dungeon Member# Name 1000 Severus Snape 1001 Cho Chiang 1002 Hermione Granger 1003 Harry Potter 1004 Ron Weasley *** Gym info written to As3-gyminfo.xml *** Submit your As3.zip file that includes all assignment files(Person.java, Student.java, Instructor.java, Course.java, StudentRegistrationComparator.java, FitnessFacility.java, GymMember.java, As3A_Driver.java, As3B_Driver.java, As3C_Driver.java)via Nexus Note that you are not required to submit any data files. ...
Purchase answer to see full attachment
Student has agreed that all tutoring, explanations, and answers provided by the tutor will be used to help in the learning process and in accordance with Studypool's honor code & terms of service.

Final Answer

norrye (630)
Duke University

Anonymous
Top quality work from this tutor! I’ll be back!

Anonymous
Just what I needed… fantastic!

Anonymous
Use Studypool every time I am stuck with an assignment I need guidance.

Studypool
4.7
Trustpilot
4.5
Sitejabber
4.4
Similar Questions
Related Tags