Australian coronavirus confirmed cases calculator

Assignment Help Programming Languages
Reference no: EM132497912

CSC1401 Foundation Programming - University of Southern Queensland

Assignment Specification - Australian Coronavirus Confirmed Cases Calculator

Goals and Topics

The assignment problem is straightforward. All necessary details have been supplied. The solution of the problem will use the programming concepts and strategies covered in Workshops 1-7. The subgoals are:
• Obtaining advanced understanding of values, variables and arrays;
• Understanding program input and output, functions and expressions;
• Understanding simple strategies like iteration, validation plans;
• Translating simple design into Pseudocode then JavaScript code
• The mechanics of editing, interpreting, building, running and testing a program
• Commenting source code
• Becoming confident and comfortable with programming in small problems

Task
In this assignment, you will design and implement an Australian Coronavirus Confirmed Cases (ACCC) calculator program for client that allows users to input the state/territory name and the number of confirmed cases, then calculate the total number of confirmed cases and average number of confirmed cases accordingly.

Functional Requirements
The program should be implemented in JavaScript and running on Firefox, a web browser independent to operating systems. The client has specified the following requirements for the functionality of the program:
1. The program should be running without errors throughout two Phases: Information Gathering and Information Presenting.
2. Information Gathering is to gather the information such as state/territory name and the corresponding confirmed cases for calculation of ACCC;
3. The program should first confirm with the user for willingness of entering a new state/territory before proceeding to gather information of the state/territory name and confirmed cases for calculation.

4. When receiving a new entry for a state/territory, the program should first prompt and ask the user to enter the state/territory name. If the user enters nothing or an invalid state/territory name, the program should alert an error message on screen and then prompt the user to re-enter. The process should iterate until a valid state/territory name is entered.
5. If the entered state/territory name is valid, the program should then prompt the user to input the corresponding confirmed cases for the state/territory. Again, if nothing or an invalid value is entered, the program should display an error message then iterate until receive a valid number of confirmed cases.
6. After valid input of state/territory name and the confirmed cases, the program should loop back to seek user confirmation for either proceeding to add one more state/territory or moving to the Information Presenting phase to calculate and display the results;
7. If the user confirms no more state/territory to enter, the Information Gathering phase is completed and the program then moves to Information Presenting.
8. In the Information Presenting phase, the program prints on the web page a table containing all entered state/territory(s), including information such as state/territory name and the confirmed cases.
9. To make the ACCC calculator user-friendly, the client also expects the program to display some statistic information:
- The state/territory(s) with the largest number of confirmed cases;

- The total confirmed cases for the entered state/territory(s);

- The average number of confirmed cases for the entered state/territory(s).

Respectively, Figure 1 and 2 illustrate the dataflow in Information Gathering and a sample result presented to the web browser in Information Presenting.

Implementation

Task 1 - A Validation Plan for state/territory name

You need to implement a validation plan to get a valid input from the user for state/territory name. A valid state/territory name needs to satisfy ALL the following criteria:
- The input should be one of the states/territories (New South Wales, Victoria, Queensland, South Australia, Western Australia, Tasmania, Northern Territory, Australian Capital Territory).
- The state/territory name should be case-insensitive.

Task 2 - A Validation Plan for the confirmed cases of entered state/territory

You need to implement another validation plan to get a valid input from the user for confirmed cases of entered state/territory. A valid input needs to satisfy the following criteria: it is a non-negative integer number.

Task 3 - An Iteration Plan for Information Gathering Phase
You need to design an iteration plan to implement the Information Gathering Phase. Refer to Functional Requirements and Fig. 1 for the detail of dataflow in iteration. Clearly, this task should incorporate the works in Task 1 and 2.

Task 4 - A Maximum Plan to find the state/territory with the largest number of confirmed cases
Your program needs to find the entered state/territory with the largest number of confirmed cases.

Task 5 - Sum, Count, Average Plans to calculate the number of confirmed cases

Your program needs to be able to calculate the average number of confirmed cases for all entered state/territory(s). The task includes:
- a sum plan to accumulate the confirmed cases of all the entered state/territory(s);

- a count plan to count the number of state/territory(s) being entered;

- an average plan to calculate the average number of confirmed cases of all the entered state/territory(s);
- handling the "Division by Zero" exception when calculating average.

Task 6 - Presenting the Detailed Information

Print to a table the detailed information of entered state/territory(s) including the state/territory name and the confirmed cases.
- The state/territory(s) should be presented with all upper case letters.
- They are listed in ascending order according to the confirmed cases of entered state/territory(s) even the state/territory with the smallest number of confirmed cases is not entered as the first input (challenge task).

Task 7 - Presenting the Statistics
Print to an unordered list the statistic information of
- the state/territory with the largest confirmed cases;

- the total confirmed cases of entered state/territory(s);

- the average confirmed cases of entered state/territory(s) and it is an integer value;

The state/territory name should be presented with all upper case letters. The table and the list should be formatted like the screenshot in Figure 2.

Attachment:- Foundation Programming.rar

Reference no: EM132497912

Questions Cloud

Why rite aids failure to write down ending inventory amount : Is the intermingling of a company's assets with those of a major shareholder, director, or company officer illegal? Is it unethical? Or is it both illegal
Discuss four main sources of financing for capital projects : How is the level debt service payment schedule different from the level principal payment schedule? Discuss four main sources of financing for capital projects
Determining the required returns for hri and lri : Calculate the required rate of return for Mudd Enterprises assuming that investors expect a 4.6% rate of inflation in the future. The real risk-free rate is 3.0
What was total percentage return on the investment : dividends of $1.25 per share. Today, you sold your stock at a price of $48.69 per share. What was total percentage return on the investment?
Australian coronavirus confirmed cases calculator : Design and implement an Australian Coronavirus Confirmed Cases (ACCC) calculator program for client that allows users to input the state/territory name
Which carrier should you choose : Assume you will keep replacing the phone after your contract expires. Your cost of capital is 4%. Based on cost alone, which carrier should you choose?
What is maga inc wacc : Maga's beta is 1,2, risk free rate 2% and the expected market rate is 2% and the expected market rate of return is 12%. What is Maga inc,'s WACC.
Write the formula for the change in the bond price : A bond has a duration of 6 years and interest rates are currently 7%. The Fed is expected to increase interest rates by 24 basis points
MGMT20143 - Think Big Assignment : MGMT20143 - Think Big Assignment Help and Solution - Central Queensland University, Australia. Title - Idea Generation and Business Model Development

Reviews

Write a Review

Programming Languages Questions & Answers

  Write a haskell program to calculates a balanced partition

Write a program in Haskell which calculates a balanced partition of N items where each item has a value between 0 and K such that the difference b/w the sum of the values of first partition,

  Create an application to run in the amazon ec2 service

In this project you will create an application to run in the Amazon EC2 service and you will also create a client that can run on local machine and access your application.

  Explain the process to develop a web page locally

Explain the process to develop a Web page locally

  Write functions

These 14 questions covers java class, Array, link list , generic class.

  Programming assignment

If the user wants to read the input from a file, then the output will also go into a different file . If the user wants to read the input interactively, then the output will go to the screen .

  Write a prolog program using swi proglog

Write a Prolog program using swi proglog

  Create a custom application using eclipse

Create a custom Application Using Eclipse Android Development

  Create a application using the mvc architecture

create a application using the MVC architecture. No scripting elements are allowed in JSP pages.

  Develops bespoke solutions for the rubber industry

Develops bespoke solutions for the rubber industry

  Design a program that models the worms behavior

Design a program that models the worm's behavior.

  Writing a class

Build a class for a type called Fraction

  Design a program that assigns seats on an airplane

Write a program that allows an instructor to keep a grade book and also design and implement a program that assigns seats on an airplane.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd