CSCI 1110 University of Toronto Create a Crude Simulation on How a Disease Can Spread Between an Infected Person and A Healthy One Other To complete this a
CSCI 1110 University of Toronto Create a Crude Simulation on How a Disease Can Spread Between an Infected Person and A Healthy One Other To complete this assignment, you will need to know about:
•
Classes & Objects
•
Inheritance
•
Interfaces
•
ADTs
•
Object Oriented Design
•
Recursion (Bonus question)
•
JavaDocs CSCI 1110 – Summer 2020
Assignment 05 – Due 31/07, 11pm
Welcome to your last CSCI 1110 Assignment! We’ll use this assignment to review the OOP concepts
we’ve seen.
In this assignment, you will write code to create a crude simulation on how a disease can spread
between an infected person and a healthy one. This assignment must be submitted in Mimir; however,
there is a GUI component (provided) that you can run on your computer to see your Simulation.
Your code must compile. If it does not compile, you will receive a 0 (zero) on that portion of the
assignment, and no partial marks will be given.
Remember that students who hardcode their outputs to match the test cases in Mimir will receive a
zero on the entire assignment.
To complete this assignment, you will need to know about:
•
•
•
•
•
•
•
Classes & Objects
Inheritance
Interfaces
ADTs
Object Oriented Design
Recursion (Bonus question)
JavaDocs
Code documentation: For assignments 2 through 5, JavaDocs (paired with inline comments) is
mandatory. Students who fail to document their public classes, methods and variables using JavaDocs
will not receive full clarity/quality marks. We will talk about JavaDocs in our lectures.
Code documentation (2): We expect students to use proper variables and methods names plus correct
capitalization in the code they submit. As a reminder: class names start with an uppercase letter (e.g.,
Cow), variables and methods with lowercase (e.g., colour), and you must use camel case to combine two
words (e.g.: currentSpeed). More examples of naming:
https://docs.oracle.com/javase/tutorial/java/nutsandbolts/variables.html
Assignment Overview
This assignment is composed of 4 parts:
1.
2.
3.
4.
Two interfaces (10 marks)
Two classes that will represent infection targets (in our case people) and diseases (60 marks)
A simulation class that will represent the transmission of disease (20 marks)
A simple user interface to visualize and control the Simulation
a. The UI code provided does not work in Mimir. Run with your IDE to see the simulation
Important: Some parts of the assignment’s code will use random numbers. You will use the Random1
class from Java to generate the numbers. You should not create a new Random number generator with
new Random() as it will make it impossible for Mimir’s grader to work. Instead, you must use the
Random static variable provided in the RandomNumbers class.
Example (creating a new random double):
Randrom rand = RandomNumbers.rnd;
double number = rand.nextDouble();
Example (creating a new random bounded int [0,bound) ):
Randrom rand = RandomNumbers.rnd;
int number = rand.nextInt(bound);
Example (testing for a 30% or.3 change of success):
if(rand.nextDouble()
Purchase answer to see full
attachment
We've got everything to become your favourite writing service
Money back guarantee
Your money is safe. Even if we fail to satisfy your expectations, you can always request a refund and get your money back.
Confidentiality
We don’t share your private information with anyone. What happens on our website stays on our website.
Our service is legit
We provide you with a sample paper on the topic you need, and this kind of academic assistance is perfectly legitimate.
Get a plagiarism-free paper
We check every paper with our plagiarism-detection software, so you get a unique paper written for your particular purposes.
We can help with urgent tasks
Need a paper tomorrow? We can write it even while you’re sleeping. Place an order now and get your paper in 8 hours.
Pay a fair price
Our prices depend on urgency. If you want a cheap essay, place your order in advance. Our prices start from $11 per page.