COIT20256 Data Structures and Algorithms

COIT20256 Data Structures and Algorithms

[ad_1]

COIT20256 Data Structures and Algorithms Term 1 2020
COIT20256 Assessment Item 3— Assignment 2
Due date: Thursday of Week 11 (28th May 2020) 11.45 pm AEST
ASSESSMENT
Weighting: 20%
Length: NA 3
1. Objectives
The purpose of this assessment item is to assess your skills attributable to the following
learning outcomes and your achievement of the expected graduate attributes of advanced
level communication, knowledge, cognitive, technical, and creative skills, and selfmanagement.
✓ Design classes which use inheritance, polymorphism, and exception handling
✓ Analyse, design and implement multi-layered software solutions, focusing on data
structures and algorithms
✓ Compare and contrast performance of different algorithms in problem solving
✓ Investigate socially innovative practices in software development.
The Assessment criteria include:
1. Efficient object-oriented program design.
2. Design and implement appropriate data structures for application development
3. Evaluate a variety of data structures and algorithmic approaches
4. Effective use of good programming practice/techniques
5. Apply classes, inheritance, polymorphism, and exception handling
6. Programmatically connect to a database and implement the database operations
7. Rigorous testing of software application
8. Work collaboratively as part of a small team
2. Assessment task – Paired Programming
Your task in this assessment is to analyse the given problem, model, and design the required
data structures using UML class diagrams. You will be implementing the software solution,
applying efficient algorithms, inheritance, polymorphism, and exception handling. You will
be using generic data structures, and lambdas and streams. The topics required for this
assessment task are from Weeks 1-10. Your Java Application should have an interactive
Graphical User Interface (GUI) using JavaFX GUI components.
Your application will connect to a database programmatically, executing necessary SQL
queries within your java program.
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 2
COIT20256 Data Structures and Algorithms Term 1 2020
You should also write an individual report, as specified in this document, demonstrating your
conceptual knowledge. You will be required to use the topics learnt in the pre-requisite unit
Introduction to Programming.
1.1 Problem
This is an extension to the problem given in Assessment Item 1 as specified here. The
Australian Bureau of Statistics (ABS) defines a homeless as a person “who does not have
suitable accommodation and whose current living arrangement:
o is in a dwelling that is inadequate, has no tenure
o is where the initial tenure is short and not extendable
o does not allow the person to have control of, and access to space for social relations”.
On Census night in 2016, more than 116,000 people were estimated to be homeless in
Australia—58% were male, 21% were aged 25–34 and 20% identified as Aboriginal and
Torres Strait Islander Australians (ABS 2018). As of June 2016, there were 194,592 applicants
waiting for social housing across the country’s social housing programs (Patterson, 2017).
End Homelessness (EH) is a newly registered Specialist Homelessness Services (SHS) who is
determined to tackle the problem of homelessness in innovative ways by using information
and communication technology to collect data, increase advocacy and if needed employ
crowd funding to raise money. The directors have decided to have a Homeless Information
System (HIS) which is reliable, flexible, and expandable. The support for the full
development of the system depends on the quality of a prototype.
As part of the Assignment One you have developed a prototype for the HIS with very limited
features.
In this Assignment you will be extending your initial prototype with additional features.
You will be developing a Java application with a GUI.
The users accessing the HIS should able to:
1. Add new location (same as Assignment 1)
2. Update the statistics of people at risk of becoming homeless by choosing: (same as
Assignment 1)
• appropriate location
• gender of the person to be added
• correct age group and
• income category
3. Display statistical reports to view:
• all males at the risk of homelessness sorted in descending order (modified from
Assignment 1)
• all people in a chosen location at the risk of homelessness
• all females at the risk of homelessness sorted in descending order based on their
age group (modified from Assignment 1)
• all at the risk of homelessness
• Save the Locations in a database (new in Assignment 2)
• Save the Risky persons in a database (new in Assignment 2)
Note: You can use the same data file futureDemand.csv. You are free to add any new
location anywhere in Australia
2.2 Design Guidelines
You can use the following guidelines in your modelling and GUI design.
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 3
COIT20256 Data Structures and Algorithms Term 1 2020
Data Structures
You may follow the class design given below. You should read the specification carefully
and design the classes using UML class diagrams and include the attributes with correct data
types and all the methods, clearly indicating public or private. Clarify your doubts during the
design stage so that your implementation can be less error prone and faster to complete.
All classes should have a default constructor, parameterised constructor, copy constructor,
accessor mutator (get, set) methods, and properly written toString() methods. Include other
methods as needed. This doesn’t apply to the JavaFX classes for the GUI.
When you save data in database, it will also create an ID for each entity. You need to include
an extra field for the ID in your classes (new in Assignment 2).
i) Location class (same as Assignment 1)
The Australian Bureau of Statistics uses the geographical mesh map which divides the total
geographic area into Mesh Blocks which is the smallest in size in terms of number of people
living in the area. Statistical Areas Level 3 (SA3s) generally have populations between
30,000 and 130,000 persons and these are often the functional areas of regional towns and
cities with a population in excess of 20,000 (ABS, 2018). The statistical data will be collected
and studied from various SA3s.
This class is to read the given file and store the locations in a LinkedList (modified in
Assignment 2). A Location has a SA3code which is a five-digit number. Each state has a
range for the SA3code and for Western Australia all SA3codes start with digit ‘5’. The
Location has a name which can be more than one word separated by ‘- ‘and a space before ‘ ‘
and space ‘ ‘ after (e.g.: “Augusta – Margaret River – Busselton”. The name should be
validated so that it contains only alphabets other than the ‘-‘ and space characters. Validate
SA3Code so that it contains only digits (new in Assignment 2).

ii) Person class (same as Assignment 1)
This is a generic class and has an age category, and a gender: “Male” or “Female”. This class
will remain abstract as no objects will be required of type Person.
iii) SA3TenantCategory class (same as Assignment 1)

This class extends the Persons class by including:
Location
income category
income source: “Employed” or “Other”.
Override the inherited methods as required. Ensure that the source code is re-used and not
repeated unnecessarily leading to redundant code.
The income sources included in the data file are: “employed” and “other”.
iv) RiskyPersons class (same as Assignment 1)
This class is for recording and displaying the statistics of people at the risk of homelessness.
This class will have:
SA3Category object,
Number of Persons in a Category
Hints and tips: Refer to Week 3 Lecture and tutorial solutions, and the Textbook chapter
on Polymorphism for the correct implementation of polymorphic behaviour.
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 4
COIT20256 Data Structures and Algorithms Term 1 2020
v) DataFile class (same as Assignment 1 with minor modification)
This class is for implementing the file operations to open, read the values from the given
‘futureDemand.csv’ file, store the values in an LinkedList<RiskyPersons>() (modified from
Assignment 1). This file will be available from the Unit website.
Use specific file handling exceptions for various checked exceptions related to file
operations.

vi) enum WEEKLY_INCOME
The actual weekly income is not recorded. The risk of homelessness is identified by the range
of income. The interested ranges are:
(-2000 -0) – NilIncome

• $1-$399 – below$400
• $400-$599 – below $600

$600-$999 – below$1000
Create the enum type to enable use of these categories as constants.
vii) enum AGE

The actual age of the people recorded is not kept, but the age category within which they
belong to are kept. The categories used are:
1. 50-54
2. 55-59
3. 60-64
4. 65 or over
viii) JavaFX classes
The standard classes required include the main class to create the Stage and launch, the
controller to initialize GUI components, handle events, and validate user entries, the .fxml
file for the layout design of GUI components, and the .css file for formatting.
You can have:
1. HomelessInfoMain class that has the main method and starts the application
2. HomelessInfoController class for event handling and data collection.
3. HomelessInfo.fxml for the .fxml
IX) DatabaseUtility class (new in Assignment 2)
This class is for saving and reading data from the ‘HomelessInfo’ database. This database
should store records of Locations, and RiskyPersons.
This class should have the following attributes:
Databse url name
sqlConnection
username
password
LinkedList<RiskyPersons>() to store and return the risky persons statistical data
LinkedList<Location> () to store and return the Location entries
This class should have
• a constructor to set values to the attributes and connect to the database
• A method to create the Database tables executing the SQL queries
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 5
COIT20256 Data Structures and Algorithms Term 1 2020
• Method to insert the Locations and Risky Persons statistical data read from the file
• Methods to insert new Locations and add a new Risky Persons
• Method to read data from the database and return the details
You should use PreparedStatements in the above methods to insert values into the database or
read values from the database.
Graphical User Interface
The GUI should have the necessary components to enable the user to execute all the
functions as provided in Section 2.1 above. You may use the guidelines provided below for
your GUI design and implementation. Variations to the provided guidelines are acceptable if
it meets the user requirements. Follow the User Interface design guidelines learnt in Week 4
and design the GUI to meet chosen aspects of an easy to use user interface that provides
informative error messages, and clear instructions.
You can have a GUI with multiple tabs for taking the user through the step by step process of
entering data about a new location, add new RiskyPerson/s belonging to an
SA3TenanatCategory to the records, and finally displaying reports choosing one of the
options. The user should be supported with the GUI in each step as given below.
i) Location
Use this Tab to enable the user to enter the SA3code, and name of a Location and add the
Location. You can choose appropriate controls (Labels, TextFields, and a Button) for these.
The Button is for adding Locations to a LinkedList<Location>.
Add a button to Save data to the database (new in Assignment 2). This will write the added
Locations in the LinkedList<Location> to the database.
Display error message if the user has not entered the Location correctly.
ii) Tenant
Use this tab to enable the user to enter the age, income, choose gender, SA3code, and income
source. The user should then be able to increment number of RiskyPersons in the
corresponding SA3TenantCategory in the existing LinkedList<>().
You can use Labels, TextFields, RadioButtons, ComboBox or ListView, and a Button to add
the data.
Add a button to Save data to the database (new in Assignment 2). This will write the added
RiskyPersons in the LinkedList< SA3TenantCategory > to the database.
iii) Reports
Use this Tab to enable the user to choose one of the available options and display the data.
You can use a TextArea to display the report details. A full GUI design diagram is not given
to encourage you to design a user friendly interface.
You can switch between Tabs by using a Continue button. Once the Continue button is
pressed and the Tab is changed the entries in the previous fields should be cleared.
Database
You can use the following information to complete your ERD. You need Entities (Tables) for
Location, Weekly_Income, and Age corresponding to the classes. An SA3TenantCategory
has a many-to-one relationship with Location, as many SA3TenantCategories can belong to
one Location. Each SA3TenantCategory has an Age, and a Weekly_Income. You can see that
RiskyPersons is a report showing the number of persons in an SA3Cateogry
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 6
COIT20256 Data Structures and Algorithms Term 1 2020
Database tasks:
1. Create a database only once. During the program execution it has to check whether
database exists, if it does not create a database.
2. Create Tables only for the first time after checking that Tables are not existing.
3. Add records to Location, Age, and Weekly_Income when first time executing, using
the data from the files.
4. Add records to SA3Cateogry for saving the data read from file.
5. Read the data from the database and load it to a LinkedList during the later executions
of the program. Therefore, file reading is not required.
6. Add Locations to the database on entry by the user.
7. Add records to SA3Category and save these to database on user entry. SA3Cateogry
will have foreign keys to link to Location, Age, and Weekly_Income.
You are reading and loading the data to LinkedList<RiskyPersons>. Use this LinkedList to
search, sort and display various records as given in Section 1.1 for display of statistical
reports. This will be more efficient and easier using lambdas and streams.
Note: The primary keys are generated during the programmatic creation of the tables and
used for other database operations. The primary keys can be auto-incremented integer
values. Create an ERD to understand the relationship between tables.
You can use a SQL query to initialize the auto-incremented primary key value to a specific
number.
Example: TABLE_SET_FIRST_LOCATION_ID = “ALTER TABLE LOCATION
AUTO_INCREMENT = 1001″;
Execute the query as shown below after executing the query to create Table.
statement.executeUpdate (TABLE_SET_FIRST_ LOCATION_ID);
3.Coding
Include necessary accessor, mutator methods, constructors, and toString() method for each
class. Also, follow good coding practices, using meaningful names, camel case notation for
naming, constants as necessary, and include meaningful comments. You can use NetBeans to
develop your application. Follow the coding standards given in the Unit website.
1.1 Paired Programming:
You can work in pairs to complete the coding. You can share the coding tasks, merge and
compile the source code. You can choose your partner yourself. You should ensure that you
inform your tutor by Week 8, about your partner. If you have any problem with choosing a
partner, please inform your tutor. Online students also can work in pairs. If there are any
problems, please contact the Unit Coordinator.
3.1Guidance to the level of assistance you can use.
You are expected to understand several concepts and apply those concepts to design and
build a software solution. At this level you can use the provided materials, online resources
for further reading and take assistance from your classmates or teammates to develop deeper
understanding of the concepts. You can also seek help to debug the implemented program.
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 7
COIT20256 Data Structures and Algorithms Term 1 2020
But you should implement and test the source code sections allocated to you during your
team meeting and planning, on your own.
Table 1 Allowed Assistance

S.No Source Activity
1 Unit Textbook, Unit notes and examples Understanding concepts, design
2 Instructors Understanding concepts, design, debugging
4 Classmates, Online resources Understanding concepts
5 Everyone else Understanding concepts
6 Only from your team member Implementing code

4 Report: Individually Written and Submitted
You should submit a report containing the following details.
1. UML class diagrams for the classes
Note: UML class diagrams generated using a software tool after completing the
coding will not be accepted.
2. Test plan showing input data, expected results, and actual results. Show testing of
erroneous entries also.
3. A table listing tasks completed by you, and the corresponding source file names and
relevant part of the source code (if it is partial completion).
4. A brief description of difficulties found in designing, implementing or debugging and
how did you solve these difficulties as a team.
5. Write a very brief description about teamwork issues such as communication
problems, expressing ideas or coming to a consensus for a solution.
5 Assignment Submission
You should submit the following source code files and word document using the Moodle
online submission system. (Note: the file names/class names could be changed to meaningful
names). Please do not zip the whole project folder and submit it.
• Location.java – Source code for the Location class
• Person.java– Source code for the Person class
• SA3Tenant.java – Source code for the SA3Tenant class
• RiskyPersons.java – Source code for the RiskyPersons class
• DataFile.java – Source code for DataFile class
• AGE.java and WEEKLY_INCOME.java for the Java enums.
• DatabaseUtility.java
• .java files for the main and controller classes
• .fxml and the .css files
1.1 Individual Submission
• Report.doc – Your word document containing the report.
A s s i g n m e n t T w o S p e c i f i c a t i o n P a g e | 8
COIT20256 Data Structures and Algorithms Term 1 2020
Assessment Item 3 Marking criteria

S.No Total Marks – 20 Marks
Allocated
Marks Scored
1 Graphical User Interface Presentation: User
Friendly Design
2
2 Design and use of appropriate data structures 1
3 Implementing classes and using objects,
methods, aggregation, and polymorphism
3
4 Efficient program design: absence of redundant
or repetitive code, correctly designed loops,
blocks, and methods
2
5 Programmatic creation of tables and use of
prepared statements
3
6 Use of exception handling 1
7 Enables User to add a person/s to an
SA3TenantCategory
1
8 Correct reading and loading of data from the
database enabling User to choose any option
and display each one of the reports
2.5
9 Good coding practices including comments,
indentation, use of constants as required, use of
meaningful names, and camelCase notation for
names
1.5
10 Well-presented report with student details,
UML class diagram, test plan, testing evidence,
collaborative problem solving, and team
management issues if any
3
Penalties
11 Late Penalty (-1 mark: 5% of total allocated
marks per calendar day)
12 Source code found entirely different from the
styles followed in the Unit or containing
constructs outside of this Unit will be penalised
(-1 to -10 marks depending on the amount of
source code)
13 Plagiarism (penalty as per the plagiarism policy)
14 Total 20

COIT20256 Data Structures and Algorithms Term 1 2020
References
1. Patterson, D., 2017. A national homelessness strategy: Why we need it. Parity, 30(6), p.10.
2. ABS 2018. Census of Population and Housing: Estimating homelessness, 2016. ABS cat. no. 2049.0.
Canberra: ABS. available from: https://www.abs.gov.au/ausstats/abs@.nsf/mf/2049.0
3. ABS 2018 Australian Statistical Geography Standard (ASGS). Available from:
https://www.abs.gov.au/websitedbs/D3310114.nsf/home/Australian+Statistical+Geography+Standard+
(ASGS)

[Button id=”1″]

[ad_2]

Source link

"96% of our customers have reported a 90% and above score. You might want to place an order with us."

Essay Writing Service
Affordable prices

You might be focused on looking for a cheap essay writing service instead of searching for the perfect combination of quality and affordable rates. You need to be aware that a cheap essay does not mean a good essay, as qualified authors estimate their knowledge realistically. At the same time, it is all about balance. We are proud to offer rates among the best on the market and believe every student must have access to effective writing assistance for a cost that he or she finds affordable.

Caring support 24/7

If you need a cheap paper writing service, note that we combine affordable rates with excellent customer support. Our experienced support managers professionally resolve issues that might appear during your collaboration with our service. Apply to them with questions about orders, rates, payments, and more. Contact our managers via our website or email.

Non-plagiarized papers

“Please, write my paper, making it 100% unique.” We understand how vital it is for students to be sure their paper is original and written from scratch. To us, the reputation of a reliable service that offers non-plagiarized texts is vital. We stop collaborating with authors who get caught in plagiarism to avoid confusion. Besides, our customers’ satisfaction rate says it all.

© 2022 Homeworkcrew.com provides writing and research services for limited use only. All the materials from our website should be used with proper references and in accordance with Terms & Conditions.

Scroll to Top