Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit

FIT9131 Assignment B: Save the Bilby

Introduction

This assignment is due by 4:30pm Friday of Week 12 (21st October, 2022). It is worth 35% of the marks for your final assessment in this unit. Heavy penalties will apply for late submission. This is an individual assignment and must be your own work. You must attribute the source of any part of your code which you have not written yourself. Please note the section on plagiarism in this document.

In preparing your program please note the following:

· You must use the workspace environment in the Ed platform to code all parts of your program. You must not copy and paste large sections of code from somewhere else. 

· You must acknowledge all code in your assignment that you have taken from other sources.

· The Java source code for this assignment must be implemented according to the FIT9131 Java Coding Standards. 

· Only a text interface is to be used for this program. More marks will be gained for a program that is easy to follow with clear information/error messages.

Any points needing clarification may be discussed with your tutor in your applied learning class. You should not make any assumptions about the program without consulting your tutor.

Completion of this assignment contributes towards the following FIT9131 learning outcomes:

1. Design and construct Java programs according to standard object-oriented principles

2. Apply and demonstrate debugging processes to Java applications

3. Develop strategies for efficient and effective program testing

4. Document code according to specific programming standards

5. Identify and apply the "object-oriented" concepts of encapsulation, abstraction and polymorphism

6. Explain and apply software engineering principles of maintainability, readability and modularisation

Specification

For this assignment you write a program to simulate the variation in a bilby population over the course of one year. This section specifies the required functionality of the program.

Background

The bilby, otherwise described as Australia’s Easter Bunny, is a ground dwelling marsupial. Bilbies have grey fur, long ears, and a distinctive black and white tail. An adult bilby is about the same size as a small rabbit. One of the indigenous names for the bilby is nyarlku.

The bilby has been classified as a vulnerable species. Once occupying habitats in more than 70% of Australia, they are now only found in desert areas of northern Australia. Their main predators are introduced foxes and feral cats.

Wildlife conservationists are concerned that they know very little about the bilby populations and are worried their long-term survival. To understand more about the survival of the bilby and the effectiveness of strategies conservationists might use to help the survival of bilbies, in this assignment you will write a computer program to simulate variations in a bilby population over the course of a year.

We will assume the conservationists have gathered data from a number of areas in a desert in the Northern Territory. This data will be used at the start of the simulation. The simulation will update the population once a month. At the end of the year the program will display the population change and the population stability, which could be used to predict the long-term survival of the bilby.

Bilby survival simulation

The Bilby survival program will simulate one year of variation to a population of bilbies and their predators.

The simulation begins by displaying a brief welcome message.

The user is then prompted for the name of area that the population data has been collected from. The name can be up to 16 characters in length.

The numbers of bilbies, foxes and feral cats at up to 10 locations is read in from a file population.txt. The file will contain one line for each location, with 3 comma separated numbers on each line, representing the numbers of bilbies, foxes and feral cats, respectively. There is no other reading from the file during the actual running of the program.

From this data, the program creates separate collections of bilbies, foxes and cats. Each animal will have a unique identification code, a location, and a status indicating whether it is alive or not. Foxes and cats will also have a health status. The details of these are as follows:

1. The unique identification code will be in the following format (where nnn represents a sequence of 3 digits):

· Bnnn for bilbies

· Fnnn for foxes

· Cnnn for cats

2. The location will be an integer, with the line from the file representing the location. So, line 1 will be location 1, line 2 will be location 2, … and so on.

3. All animals will be alive at the start of the simulation.

4. The health status of foxes and cats will start at 3.

The simulation steps through 12 months. At each month the bilby population at each location is assessed, the conservationist makes any necessary interventions, and a summary of the bilby, fox, and cat populations at each location is displayed.

At the end of the year, the population stability is assessed, the population data at each location is displayed, and a summary is written to the file populationFinal.txt. The details written to the file will be the numbers of live and dead bilbies, foxes, and feral cats at each location. The file will contain one line for each location, with 6 comma-separated numbers on each line, representing the numbers of live bilbies, dead bilbies, live foxes, dead foxes, live feral cats, and dead feral cats, respectively.

Specific actions each month

Each month the following events may occur:

· New bilbies may be born. The probability of each bilby giving birth to a new bilby is 0.15. (Hint: to calculate the probability of event, generate a random number from 1 to 100. There is a 1% chance of each of these numbers being generated so you can nominate numbers 1-15 for a bilby birth).

· New foxes and cats may be born and added the population. The probability of each fox giving birth is 0.1. The probability of each cat giving birth is 0.2.

· A live fox may eat a bilby at the same location. Each fox has a 0.4 probability of eating a bilby if there is at least one bilby at the fox’s location. If a fox eats a bilby then one bilby at the fox’s location has their alive status changed to false. If the fox doesn’t eat a bilby then the fox’s health status is reduced by one. If a fox’s health status is zero then their alive status is changed to false.

· Similarly, a live cat may eat a bilby at the same location. Each cat has a 0.6 probability of eating a bilby if there is at least one bilby at the cat’s location. If a cat eats a bilby then one bilby at the cat’s location has their alive status changed to false. If the cat doesn’t eat a bilby then the cat’s health status is reduced by one. If a cat’s health status is zero then their alive status is changed to false.

After these events a summary of the population of live bilbies, foxes and cats at each location is displayed. At this point the conservationist may decide to:

· relocate bilbies if their population at a location becomes too large. This involves changing the location of any bilbies in excess (more than 20). If excess bilbies are not moved then their alive status changed to false. Relocations may happen each month.

· conduct an intervention to reduce the number of predators. This involves hunting the foxes and cats. If this happens then the probability of eliminating each animal is 0.5. Interventions are expensive and may only happen once a year.

Specific actions at the completion of observations at all locations

At the end of the simulation the following summary is displayed on the screen.

1. Population details at each location:

· Numbers of live bilbies, foxes and cats

· Numbers of bilbies, foxes and cats that have been born

· Numbers of bilbies, foxes and cats that have died

2. Bilby population change:

( total_bilbies_at_end - total_bilbies_at_start) * 100/ total_bilbies_at_start

3. Bilby population stability factor:

(total_bilby_births + total_bilby_deaths) / total_bilbies_at_start

The closer to 0 this factor is, the more stable the population.

4. Predator population change (a predator is a fox or cat):

( total_predators_at_end - total_predators_at_start) * 100/ total_predators_at_start

Program and Class Design

The design of the program will be discussed in your Applied Class in Week 9. It is important that you attend this class.

Important Notes

1. Your program must demonstrate your understanding of the object-oriented concepts and general programming constructs presented in FIT9131. Consider carefully your choice of classes, how they interact and the fields and methods of each class. You must use appropriate data structures to store the various objects (bilby, fox, location, etc.) in the program. You must make use of both Arrays and ArrayLists in your program. Make sure that you discuss your design with your tutor. You must document any additional assumptions you made.

2. You will be required to justify your design and the choice of any data structures used at the interview.

3. Validation of values for fields and local variables should be implemented where appropriate. You should not allow an object of a class to be set to an invalid state (i.e. put some simple validations in your mutator methods).

4. Your program should handle incorrect or invalid input and present the user with relevant error messages. No invalid input should crash the program.

5. Exception handling should be used where appropriate.

Assessment

Assessment for this assignment will be done via an interview with your tutor. The marks will be allocated as follows:

· 8% - Test strategy for the Bilby class.

· 27% - Java code and object-oriented design quality. This will be assessed on code quality (e.g. compliance with coding standards) appropriate implementation of classes, fields, constructors, methods and validation of the object’s state.

· 12% - Progress of test strategy and code development, as shown via Ed workspace environment. Your tutor will assess your work during your applied session in weeks 10 and 11.

6% in week 10 for Bilby class and its test strategy

6% in week 11 for at least two classes in addition to Bilby class

· 53% - Program functionality in accordance to the requirements.

A reminder that you must use the workspace environment in the Ed platform (opposite this assignment specification) to code all parts of your program. You must not copy and paste large sections of code from other sources, and you must acknowledge any code in your assignment that has been taken from other sources.

Marks will be deducted for untidy/incomplete submissions.

You must submit your work by the submission deadline on the due date (a late penalty of 10% per day, inclusive of weekends, of the possible marks will apply). There will be no extensions - so start working on it early.

All submitted source code must compile. Any submission that does not compile, as submitted, will receive a grade of ‘N’.

Submission Requirements

The assignment must be submitted by 4.30pm Friday of Week 12 (21st October 2022).

The submission requirements for Assignment B are as follows:

· The main class in your program MUST be called SaveTheBilby.java and it should contain the main() method to start the program.

· Test strategy for Bilby class submitted as a pdf file.

· Submit all your work (coding and test strategy) via the Ed platform.

· Re-submissions are allowed (and encouraged) before the submission deadline. Please ensure however that you do not click on the submit button after the due date. Your final submission will be used for grading purposes, and any submission made after the deadline will incur a late penalty.

· A signed Assignment Cover Sheet. [Note: You are required to download the Assignment Coversheet, sign the document and upload the pdf file in the Ed platform (you may drag and drop to the Toggle Pane)]

Marks will be deducted for any of these requirements that are not complied with.

Warning: there will be no extensions to the due date. Any late submission will incur a 10% per day penalty. It is strongly suggested that you submit the assignment well before the deadline, in case there are some unexpected complications on the day (e.g. interruptions to your home internet connection).

Plagiarism and collusion

Plagiarism and collusion are viewed as serious offences. All submitted code will be subjected to a similarity checker, and any submissions determined to be similar to a submission from a current or past student will be investigated further. The outcome of the decision pertaining to plagiarism and/or collusion will be determined by the faculty administration. If it is determined that plagiarism or collusion has occurred then you may be severely penalised, from losing all marks for the assignment, to facing disciplinary action at the Faculty level. To ensure compliance with this requirement, be sure to do all your coding in the Ed workspace environment and do not copy and paste any code into the workspace environment.