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

  Challenges of incorporating natural command language

From the e-Activity, Amore's and Quesada's article discusses the challenges of incorporating Natural Command Language Dialogs (NCLDs) into a phone system

  Explain proper use of html with all of the elements

The proper use of HTML, with all of the elements, codes, tags, headers, forms, Metadata, and categories will assure that you will structure your site to be accessible to the users of your site, your target audience

  Write program to take as input salesperson-s expected sales

Write program to take as input the salesperson's expected weekly sales and outputs the wages paid under each plan as well as announcing the best-paying plan.

  Create visual basic windows application

Create Visual Basic Windows application. Use following names for solution and project, respectively: Raise Solution and Raise Project.

  Write program that prompts user to specify people and car

Write a C++ program that prompts the user to specify people and cars. Store them in a vector and a vector .

  Identify where each security application or countermeasure

Briefly describe each of the listed network security applications and security countermeasures. Identify where each security application or countermeasure is located within the seven domains of a typical IT infrastructure.

  Arguments for and against allowing mixed-mode arithmetic exp

1). State your own arguments for and against allowing mixed-mode arithmetic expressions.

  Provide a room number and a room capacity

comparative overview of the languages highlighting how they were suitable or not suitable for the creating this type of application is also required.

  Identify why the two tests fail and correct the code

Your first task in this assignment is to study the given code, identify why the two tests fail, and correct the code.

  Write function to calculate and print fractional powers

Write down a function which calculates and prints fractional powers of its first argument as shown below for first argument of 2(1/2,1/4,1/8 and so on).

  Select the names and average salaries for all departments

Employee table contains the following fields: ID, firstname, lastname, deptid, managerid, projectid.

  Identify and discuss the four different dom nodes

Identify and discuss the four different DOM nodes. The properties to be stored should include Make, Model, Year, and Color. Write code that will display these properties using a single alert statement.

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