logo Use CA10RAM to get 10%* Discount.
Order Nowlogo
(5/5)

Assignment 2 — OO Software Development COMP 155 : Object-Oriented Programming

INSTRUCTIONS TO CANDIDATES
ANSWER ALL QUESTIONS

i need help with java oop assignment

 

 

Assistant Professor

Computer Information Systems

University of the Fraser Valley

 

Assignment 2 — OO Software Development

COMP 155 : Object-Oriented Programming

(100 points)

 

Brief Description

This assignment amounts to 10% of the entire course grade. In particular, whatever your obtains as a

score will be scaled to this value for final grade computation. You are required to work ALONE. No

late submission will be permitted (see deadline above).

The goal of this assignment is to assess your knowledge and skills on Object-oriented concepts with

Java, while developing skills to map requirements (e.g. system model) to program code. You will find a

grading scheme at the end of this document – to guide you on instructor’s expectations while preparing

your submission.

Software Requirements

In this assignment, we will be commencing an implementation of COVID-19 monitoring and alert system.

In particular, we shall developing the building blocks for our desired system. The pandemic has hit hard

and affected the way we conduct our day-to-day businesses. Besides, the economy is bleeding and needs

urgent rescue strategies be deployed to ensure we return to normalcy.

This system will monitor COVID-19 in your neighborhood. It assumes there is a web service designated

as a source of information about all persons in Canada (including) their COVID status. Information

stored include: name, age, sex, address and a unique identifier (which could be a Social Insurance

Number - SIN). Allowed values for sex include: male, female or unknown (when a person prefers not to

specify).

An address is characterized with unit number, street number, street name, postal code, city, province

and type. Allowed values for address type are business, home, office. As everyone is at the risk of

contracting COVID-19, we allowed the following values for effective monitoring - positive, negative,

symptomatic (people with some COVID symptoms but are negative), asymptomatic (people that are

confirmed COVID positive but are not showing related symptoms), and unknown.

In addition, we introduce two shapes - rectangle and circle for the purpose of determining the proximity

of infection and effectively disseminate orders and warning messages. The dissemination of information

is based on an operational radius (which may be based on a policy). Whenever there is an infection, all

1

COMP 155: Assignment 2 — OO Software Development Opeyemi Adesina, PhD

the persons enclosed in the bounding rectangle of the operational radius are notified. Depending on the

cluster of infections, an alert about order or warning is issued by our system.

1. The model in figure 1 is a conceptual representation of a neighborhood. While red denotes people

with confirmed positive COVID cases. In our case, these are people whose status is either positive

or asymptomatic. Yellow is designated for people showing symptoms, while green designates people

who neither show symptoms nor COVID positive. Our goal is to develop the code corresponding

to these domain and implement the system in question.

Figure 1: Conceptual model of a neighborhood – showing infections

2. It figure 2, we present a domain model which represents the internal structure of system. It is

represented in a unified modelling notation with the goal of helping you understand the underlying

structure and to help you navigate the code. You are required to provide implementations

for the following:

13 points Location Class

• constructors

• accessor methods (getters and setters – for each instance variable)

• an overload of equal(. . .) method

• an overload of toString(. . .) method (see the output for acceptable format)

15 points Circle Class

• constructors

• accessor methods (getters and setters – for each instance variable)

• an overload of equal(. . .) method

UFV is located in S’olh T ´ em´ exw, the traditional territory of the St ´ o:l ´ o people. ¯ Page 2 of 4

COMP 155: Assignment 2 — OO Software Development Opeyemi Adesina, PhD

Figure 2: COVID-19 Alert and Monitoring Domain Model

• an overload of toString(. . .) method (see the output for acceptable format)

• specialized implementations for the following:

– double perimeter(. . .) – 2πr

– double area(. . .) – πr2

– Rectangle boundingRectangle(. . .) – returns rectangle whose length = width = 2r.

15 points Rectangle Class

• constructors

• accessor methods (getters and setters – for each instance variable)

• an overload of equal(. . .) method

• an overload of toString(. . .) method (see the output for acceptable format)

• specialized implementations for the following:

– double perimeter(. . .) which is 2(l + b)

– double area(. . .) which is l ∗ b

– Rectangle boundingRectangle(. . .) – returns itself.

20 points Address Class

• constructors

• accessor methods (getters and setters – for each instance variable)

• an overload of equal(. . .) method

• an overload of toString(. . .) method (see the output for acceptable format)

27 points Person Class

• constructors

• accessor methods (getters and setters – for each instance variable)

• an overload of equal(. . .) method

• an overload of toString(. . .) method (see the output for acceptable format)

For implementation purposes you will find statements of the form: ”INSERT YOUR CODE”. Apart

from these places, do not modify any other part of the program unless you have consulted with the

UFV is located in S’olh T ´ em´ exw, the traditional territory of the St ´ o:l ´ o people. ¯ Page 3 of 4

COMP 155: Assignment 2 — OO Software Development Opeyemi Adesina, PhD

instructor. I have included a test cases for each of the classes you are to create and their associated

methods in the QualityAssurance.java file. An example output for a run is given in figure 3. You

can as well obtain hint to implement the toString(. . .) from the output (of example run) in the stub

directory.

To compile and execute your code, please follow these chain of commands in the given sequence:

• javac -d . *.java (from the directory container the files - hard compile, compiling classes into their

respective packages)

• java Tracker (program execution from the same directory)

Figure 3: Expected Output

Grading Scheme

The following scheme will be used to grade your submission. Therefore, you may also use it as a guide

in preparing your deliverable.

Grade Item Weight

A syntactically and semantically correct program, passing all

the test cases included. You will be able to monitor your

progress using the test cases as a guide.

90

A program with detailed program documentation and uses sensible variable names. Your program’s file name and other

files should be zipped and named in the following format - [firstName lastName studentID]

10

Total 100

UFV is located in S’olh T ´ em´ exw, the traditional territory of the St ´ o:l ´ o people. ¯ Page 4 of 4

(5/5)
Attachments:

Expert's Answer

642 Times Downloaded

Related Questions

. Introgramming & Unix Fall 2018, CRN 44882, Oakland University Homework Assignment 6 - Using Arrays and Functions in C

DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma

. The standard path finding involves finding the (shortest) path from an origin to a destination, typically on a map. This is an

Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t

. Develop a program to emulate a purchase transaction at a retail store. This program will have two classes, a LineItem class and a Transaction class. The LineItem class will represent an individual

Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th

. SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

. Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of Sea Ports. Here are the classes and their instance variables we wish to define:

1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of

642 Times Downloaded

Ask This Question To Be Solved By Our ExpertsGet A+ Grade Solution Guaranteed

expert
Um e HaniScience

906 Answers

Hire Me
expert
Muhammad Ali HaiderFinance

547 Answers

Hire Me
expert
Husnain SaeedComputer science

901 Answers

Hire Me
expert
Atharva PatilComputer science

715 Answers

Hire Me
June
January
February
March
April
May
June
July
August
September
October
November
December
2025
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
SunMonTueWedThuFriSat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
1
2
3
4
5
00:00
00:30
01:00
01:30
02:00
02:30
03:00
03:30
04:00
04:30
05:00
05:30
06:00
06:30
07:00
07:30
08:00
08:30
09:00
09:30
10:00
10:30
11:00
11:30
12:00
12:30
13:00
13:30
14:00
14:30
15:00
15:30
16:00
16:30
17:00
17:30
18:00
18:30
19:00
19:30
20:00
20:30
21:00
21:30
22:00
22:30
23:00
23:30