代做CA3 Group Assignment程序、Java编程设计代写

- 首页 >> CS

Diploma in Information Technology
Programming Fundamentals
CA3 Group Assignment
January 2023 Semester
Submission Date: 12 February 2024, 11.59 a.m.
Continuous Assessment 3 Group Assignment (40%)
The Java application constitutes 30% of your overall grade, while the class
presentation is another 10%. Total marks for this assessment is 100 marks.
Project Task:
To enhance the experience of zoo enthusiasts, you are required to develop a
command line application using any Java IDE. This application should simulate the
management of a virtual zoo, including handling animals, enclosures, and
zookeepers. The Java application constitutes 30% of your overall grade, while the
class presentation is another 10%. The total marks for this assessment are 100
marks.
Project Requirement
With what you have learned from the module, you are task to develop the Java
application with the following:
1. You are required to write FOUR (4) Java classes.
a. Zoo
b. Animal
c. Enclosure
d. ZooManagement (Main Class)
More information about these Java classes will be on the next section of this
document.
2. Implement Error Handling methods on relevant functions.
Your program should handle errors effectively, ensuring the program only
terminates when the user chooses to exit, rather than due to unhandled
exceptions or runtime errors.
Class Descriptions
For each of the FOUR (4) Java classes listed above, you are to refer to their UML
class diagrams below, as well as their field and method descriptors, to determine a
way to code them. For each class, you are also to:
Define appropriate constructor(s) for them.
Define all needed getter and setter functions for them.
Note: All fields and methods listed in the UML class diagrams are COMPULSORY.
You can add any number of fields and methods that you need to help you implement
the class.
Zoo
- name : String
- description : String
- enclosures : ArrayList


+ <> Zoo(name : String, description : String,<br>enclosures : ArrayList<enclosure>)<br>+ getTotalEnclosureArea() : int<br>+ countEnclosures() : int<br>Field Descriptors<br> name: Name of the Zoo.<br> description: Description of the Zoo.<br> enclosures: A list of all the enclosures in the Zoo.<br>Method Descriptors<br> getTotalEnclosureArea(): Counts the total area across all enclosures inside<br>the enclosures ArrayList.<br> countEnclosures(): Counts the total number of Enclosures in the enclosures<br>ArrayList.<br>Enclosure<br>- name : String<br>- area : int<br>- animals : ArrayList<animal><br>+ <<constructor>> Enclosure(name : String, area : int, animals :<br>ArrayList<animal> )<br>+ countAnimals() : int<br>+ getUtilisedArea() : int<br>+ getUtilisedAreaPercentage() : double<br>+ countSpecies() : int<br>+ addAnimal( animal : Animal ) : bool<br>Field Descriptors<br> name: Name of the enclosure.<br> area: Number of units of space in the enclosure. Determines how many<br>animals can be stored in the enclosure. See areaNeeded in Animal for more<br>information.<br> animals: List of animals in this enclosure.<br>Method Descriptors<br> countAnimals(): Counts the total number of animals inside the animals<br>ArrayList.<br> getUtilisedArea(): Gets the total units of space that the animals in the<br>enclosure are taking up.<br> getUtilisedAreaPercentage(): Returns a value between 0 to 1. For example, if<br>75% of the available area is used by animals, this will return 0.75.<br> countSpecies(): Counts the number of unique species in this enclosure.<br>Returns the number of unique species in this enclosure.<br> addAnimal(): Adds an animal to the animals ArrayList if there is enough<br>space. Returns true if successful. Otherwise returns false.<br>Animal<br>- species : String<br>- enclosure : Enclosure<br>- areaNeeded : int<br>+ <<constructor>> Animal(species : String, enclosure : Enclosure,<br>areaNeeded : int)<br>+ hasCompanion() : bool<br>Field Descriptors<br> species: The species of this Animal.<br> enclosure: The Enclosure that this Animal belongs to.<br> areaNeeded: The amount of area this Animal takes up. See area in Enclosure<br>for more information.<br>Method Descriptors<br> hasCompanion(): Does the animal have another companion of the same<br>species inside of its enclosure? Returns true if so, otherwise returns false.<br>ZooManagement<br>- zoos : ArrayList<zoo><br>+ main(args : String[])<br>+ manageZoos()<br>+ manageEnclosures()<br>+ manageAnimals()<br>In ZooManagement, you will be required to code the following functionalities:<br>1. Manage Zoos: This option will open a set of suboptions that allow the user<br>to...<br>a. Create new Zoos.<br>b. Delete existing Zoos.<br>c. Calculate and output the total area of all enclosures in the zoo.<br>d. Count and output the total number of enclosures.<br>2. Manage Enclosures: This option will open a set of suboptions that allow the<br>user to...<br>a. Add an Enclosure to a Zoo.<br>b. Delete an existing Enclosure from a Zoo.<br>c. Get the utilised area in a given enclosure.<br>d. Get the percentage of utilised area in a given enclosure.<br>e. Count the number of species in an enclosure.<br>3. Manage Animals: This option will open a set of suboptions that allow the user<br>to...<br>a. Add animals to an enclosure.<br>b. Remove animals from an enclosure.<br>c. Check if an animal has a companion in its enclosure.<br>Note: The user will be able to continuously select commands from ZooManagement<br>until they choose to exit the program.<br>Documentation<br>On top of the Java Application development, you will also be required to submit a<br>report with the following documentation:<br>A short reflection on this assignment with the following pointers:<br>1. Things you have learnt through doing the assignments<br>2. Screenshot and explanation on unresolved/unachievable requirements.<br>Assessment Topics<br>Topics 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17<br>Submission Instructions<br>You are required to put the following files into a ZIP folder for submission:<br>1. All Java class files required to run the program (other project files are NOT<br>required).<br>2. Your assignment report<br>The ZIP folder should be named in the following format:<br>[GROUP NAME]_ SIM_PF_CA3.<br>In the assignment report, students are also required to clearly state the name<br>and student ID of every student in the group. Students should keep a copy of<br>assignment submitted.<br>The assignment must be submitted BY 11.59 a.m. on 12 February 2024.<br>Penalty for Late Submission of Assignment<br> By one day: 20% to be deducted from total marks.<br> More than one day: Submission will NOT be graded.<br>A marking rubric for this assignment can be found in the appendix of this<br>assignment.<br>Important Dates of CA3 Assignment<br>CA3 Group Assignment Deadline: 11.59 a.m. on 12 February 2024<br>Zip all assignment files. Submit your assignment via Canvas. All assignment files<br>must be submitted in order to be graded.<br>Lecturer Contact<br>You should contact your lecturer via your SIM email whenever you encounter any<br>issue or have questions about your project. You may send your email to:<br>tpek001@mymail.sim.edu.sg<br>Appendix<br>Marks Breakdown<br>S/N Requirement Marks<br>Java Project (100 marks)<br>1 Zoo Java Class 20 marks<br>2 Enclosure Java Class 20 marks<br>3 Animal Java Class 20 marks<br>4 ZooManagement Java Class 20 marks<br>5 Program Error Handling 10 marks<br>6 Reflection 10 marks<br>Sample Output<br>Below is a sample output of the program that you need to build. It does NOT include output for all the functions that you are required to<br>build, so you will need to decide how to fulfill the outputs for those functionalities in your project.<br>You need not follow the sample output word for word. Feel free to improve upon the text output or interface if you wish.<br>Welcome to the Zoo Management System!<br>Zoo Management System<br>1. Manage Zoos<br>2. Manage Enclosures<br>3. Manage Animals<br>4. Exit<br>Enter your choice: 1<br>Zoo Management - Manage Zoos<br>1. Create new Zoo<br>2. Delete existing Zoo<br>3. Calculate total area of all enclosures in the zoo<br>4. Count total number of enclosures<br>5. Back to main menu<br>Enter your choice: 1<br>Enter Zoo details:<br>Name: National Zoo<br>Description: A large zoo with a variety of animals.<br>Zoo created successfully!<br>Zoo Management - Manage Zoos<br>1. Create new Zoo<br>2. Delete existing Zoo<br>3. Calculate total area of all enclosures in the zoo<br>4. Count total number of enclosures<br>5. Back to main menu<br>Enter your choice: 3<br>Total area of all enclosures in the zoo: 1200 square units<br>Zoo Management System<br>1. Manage Zoos<br>2. Manage Enclosures<br>3. Manage Animals<br>4. Exit<br>Enter your choice: 2<br>Zoo Management - Manage Enclosures<br>1. Add an Enclosure to a Zoo<br>2. Delete an existing Enclosure from a Zoo<br>3. Get utilised area in a given enclosure<br>4. Get percentage of utilised area in a given enclosure<br>5. Count number of species in an enclosure<br>6. Back to main menu<br>Enter your choice: 1<br>Enter Enclosure details:<br>Name: Lion Enclosure<br>Area: 500<br>Select a Zoo to add the enclosure:<br>1. National Zoo<br>Enclosure added successfully!<br>Zoo Management - Manage Enclosures<br>1. Add an Enclosure to a Zoo<br>2. Delete an existing Enclosure from a Zoo<br>3. Get utilised area in a given enclosure<br>4. Get percentage of utilised area in a given enclosure<br>5. Count number of species in an enclosure<br>6. Back to main menu<br>Enter your choice: 3<br>Enter the name of the enclosure: Lion Enclosure<br>Utilised area in Lion Enclosure: 0 square units<br>Zoo Management System<br>1. Manage Zoos<br>2. Manage Enclosures<br>3. Manage Animals<br>4. Exit<br>Enter your choice: 4<br>Exiting Zoo Management System. Goodbye!<br><br></zoo><!--<constructor-->
站长地图