Sit102 assignment - development of a final product a


Assignment Introduction

Project parts 1 to 3 (and later Projects 2 and 3) represent steps in the development of a final product; a program that implements a working solution to a problem. The following problem forms the basis for all of the assessment tasks undertaken during the trimester. Each assessment task will build on the previous task to gradually develop the final working application.

1895_Figure.jpg

You are required to write a program to continuously enter the following information until the user chooses to exit.
- Chemical Name
- Year purchased
- Supplier
- Quantity
- Cost
- Toxicity (out of 10)
- Flammability (out of 10)
- Corrosiveness (out of 10)
- Explosive (out of 10)
- Harmful (out of 10)
Ratings range from 0 - harmless to 10 - very dangerous.
After the data has been entered correctly, calculate the overall rating of the chemical as follows.
- Toxicity (out of 10) : 20% of overall rating
- Flammability (out of 10 : 20% of overall rating
- Corrosiveness (out of 10 : 14.5% of overall rating
- Explosive (out of 10) : 30% of overall rating
- Harmful (out of 10) : 15.5% of overall rating
Express the overall rating as a whole number out of 10 and write the rating as a series of '*' characters. An example of the expected output of your program is shown below:

Enter the following chemical data Chemical Name > hydrofluoric acid Year purchased > 2010
Supplier > Acme chemicals Quantity (L/Kg) > 3.5
Cost > 65.55
Rate the following out of 10
Toxicity > 7
Flammability > 6
Corrosiveness > 4
Explosive > 8
Harmful > 7
Overall rating is 7/10 : *******
Exit (y/n) > y

This project part requires you to develop and submit a small program to demonstrate you understand the programming concepts presented from week 1 to week #.
Create a new C# console application project in Visual Studio and name the project Proj1Part1. Notes:
- Ensure you desk check the example calculations as this information is example data only
- You DO NOT have to provide looping or any error checking. For now your program only has to exit after the first chemical has been entered and calculated (i.e. your program should exit no matter whether the user enters ‘Y' or ‘N' at the exit prompt).
- Organise and indent your code.
- Provide a general comment at the top of the C# file containing your name and Deakin College ID
- Provide code comments as required

Part 2

This project part requires you to develop and submit a small program to demonstrate you understand the programming concepts presented from week 1 to week 5.

Create a new C# console application project in Visual Studio and name the project Proj1Part2. Program description:

Develop a program that extends off your previous part 1 submission and allows for additional features including input validation, in order to create a more robust software application.

Notes:
Your program should display appropriate informative prompts, retrieve the data from the keyboard and check the data is valid then store each entry to be used to display output or used to calculate the overall rating.
Where an error has been detected in the data entry process, display an appropriate message then exit the program. Error checking should include:
- Name and Supplier cannot be blank or empty
- Year must be 4 digits and start with 20, year must be greater than 2010 and not higher than the current year.
- Quantity can be decimal and must be greater than 0
- Cost can be decimal, and must be greater than 0
- Data entered is a valid type. EG: Ratings must be integers, quantity must be decimal etc.
- Data entered is within the correct constraints. EG: Ratings must be 0 to 10 only
You should output the results a follows (Note in the example the results are formatted and aligned): You should output the results a follows:
Enter the following chemical data Chemical Name > hydrofluoric acid Year purchased > 2011
Supplier > Acme chemicals Quantity (L/Kg) > 3.5
Cost > 35.65
Rate the following out of 10
Toxicity > 7
Flammability > 6
Corrosiveness > 4
Explosive > 8
Harmful > 7

Part 3

This project part requires you to develop and submit a small program to demonstrate you understand the programming concepts presented from week 1 to week 6.
Create a new C# console application project in Visual Studio and name the project Proj1Part3. Program description:
Develop a program that continuously collects information about a chemical and associated rating until the user decided to exit the program as per the Task Description.
Using the solution provided for project 1 part 3 or your code, enhance and change the program to perform the following:
Create a menu that contains the following options:
- Get chemical details (m)
- Get chemical ratings (r)
- Calculate overall rating and display (c)
- Exit (x)
Display the menu and wait for the user's response.
Process the options entered until the user enters 'x' to quit. Using a switch statement organise the code to suit the option Option ‘m': Get chemical details should do the following: Collect and store the following information from the user:
- Chemical Name
- Year purchased
- Supplier
- Quantity
- Cost
Option ‘r': Get chemical ratings should do the following: Collect and store the ratings:
- Toxicity (out of 10)
- Flammability (out of 10)
- Corrosiveness (out of 10)
- Explosive (out of 10)
- Harmful (out of 10)

Option ‘c': Calculate overall rating and display (c) should do the following: Calculate the chemical rating using the following:
- Toxicity (out of 10) : 20% of overall rating
- Flammability (out of 10 : 20% of overall rating
- Corrosiveness (out of 10 : 14.5% of overall rating
- Explosive (out of 10) : 30% of overall rating
- Harmful (out of 10) : 15.5% of overall rating Output the results a follows:
Chemical data
Chemical Name :
Year purchased : Supplier : hydrofluoric acid
2016
Acme chemicals
Quantity (L/Kg) : 3.5
Cost : $35.65
Rating
Toxicity : 7
Flammability : 6
Corrosiveness : 4
Explosive : 8
Harmful : 7
Overall rating is 7/10: *******

Option ‘x': Exit (x) should do the following: Exit the program
Notes:
- Your program should display appropriate informative prompts, retrieve the data from the keyboard and check the data is valid then store each entry to be used to display output or used to calculate the overall rating
- Where an error is detected in the data entry process, display an appropriate message then re-prompt the user to enter the data again
- You need to ensure that the option ' Get chemical ratings (r) ' is not executed if the chemical details (m) have not been entered
- You need to ensure that the option 'Calculate and display (c)' is not executed if the chemical details and ratings (r) have not been entered
- Use a for loop to write the '*' character to the screen
- Ensure you place a comment at the top of the program that contains your full name and student number
- Place comments in your code as required and ensure you layout your code appropriately

Attachment:- Program.rar

Request for Solution File

Ask an Expert for Answer!!
Programming Languages: Sit102 assignment - development of a final product a
Reference No:- TGS02385744

Expected delivery within 24 Hours