COMP202 Data Structures and Algorithms Assignment 1 solution

$24.99

Original Work ?
Category: You will Instantly receive a download link for .ZIP solution file upon Payment

Description

5/5 - (6 votes)

Description
This assignment is designed to assess your understanding of java essentials; abstractions, interfaces,
encapsulation, polymorphism and access control of java methods. The project is about animals. There
are many species in animal kingdom with many common behaviors as well as their different properties.
In this assignment you are required to implement some of the parts of the provided files to complete
it. The code has comments about the assigment. Majority of what you need to do is actually in these
comments so make sure you read them carefully. You are provided with a java project which contains
following files (bold ones are the ones you need to modiy):
• Animal.java: This file includes the definition of the Animal abstract class. You are going to need
to look at this file however you do not need to modify anything in it.
• iHabitat.java: This file includes the definition of the iHabitat interface which is implemented by
the Animal class. You are going to need to look at this file however you do not need to modify
anything in it.
• iBehavior.java: You need to implement the iBehavior interface in this file. Follow the instructions given in the code.
• Cat.java: You are provided with the basic structure of the Cat class in the file. Follow the
instructions carefully to complete the sections where you are required to write code.
• Angora.java and Caracal.java: You are required to implement the Angora and the Caracal
classes by following the instructions given in the files.
• Main.java: Use this file to print outputs for Angora, Caracal and the Cat classes.
• Util.java: This file includes utility functions. Do not worry about it, you will not need to use
anything from this file in this assignment.
Grading
Your assignment will be graded through an autograder. Make sure to implement the code as instructed,
use the same variable and method names. We will not only check the outputs but your whole implementation will be assessed such as access modifiers of methods and variables, input/output parameters
of methods and class constructors.
1
A version of the autograder is also released to you. Our version will more or less be similar, potentially
including more tests. Since this release follows an initial upload, make sure you are working on the correct
version. Simply replace the Main.java with the new one and put the Autograder folder where your code
is. Make sure to update package names if they give you trouble. Run the new main program to get the
autograder output and your grade. You should not need to change anything else
In case the autograder fails or gives you 0 when you think you should get more credit, do not panic.
Let us know. We can go over everything even after your submission.
Submission
You are going to submit a compressed archive through the blackboard site. The file can have zip, tar,
tar.gz or 7z format. This should extract to a folder with your student ID without the leading zeros.
This folder should contain Angora.java, Caracal.java, Cat.java and iBehavior.java. Other files, which
you should not have modified anyways, will be deleted.
Submission Instructions
• You are going to submit a compressed archive through the blackboard site.
• The file can have zip, tar, tar.gz or 7z format.
• This compressed file should extract to a folder with your student identification number with the
two leading zeros removed which should have 5 digits.
• The previous point is very important, I do not want to see multiple folders (apart from operating
system ones such as MACOSX or DS Store). I do not want to play inception with your code.
• Inside the folder, you should only have Angora.java, Caracal.java, Cat.java and iBehavior.java.
Anything else will be deleted. Make sure your code runs with the other provided files that should
not have been modified.
• Code that does not compile will receive 0 credits!
• One advice is after creating the compressed file, move it to your desktop and extract it. Then
check if all the above criteria is met.
• Once you are sure about your assignment and the compressed file, submit it through Blackboard.
• DO NOT SUBMIT CODE THAT DOES NOT TERMINATE OR THAT BLOWS UP
THE MEMORY. I will take these as malicious acts and will proceed accordingly.
Let us know if you need any help with setting up your compressed file. This is very important. We
will put all of your compressed files into a folder and run multiple scripts to extract, cleanup, grade and
do plagiarism checking. If you do not follow the above instructions, then scripts might fail. This will
lead you to get a 0.
2