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:

•

Don't use plagiarized sources. Get Your Custom Essay on
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
For $10/Page 0nly
Order Essay

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

Calculator

Calculate the price of your paper

Total price:$26

Need a better grade?
We've got you covered.

Order your paper