Calculate the overall rating of the chemical

Assignment Help Programming Languages
Reference no: EM131590202

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

Reference no: EM131590202

Questions Cloud

Moisture preferred by tropical rodents : What is a hypothesis concerning the level of moisture preferred by tropical rodents.
Why is the equity method appropriate for the teller corp : Jornalize the entries by Penn Corporation to record the following information: Why is the equity method appropriate for the Teller Corp. investment
What is fraud and how does it occur : What is fraud and how does it occur? Within your discussion, incorporate the fraud triangle. There are three elements to the fraud triangle
How polymorphism might be used in a system you are familiar : Discuss a real-world example of how polymorphism might be used in system you are familiar with. Explain different techniques for identifying candidate solution.
Calculate the overall rating of the chemical : SIT102 Assignment - development of a final product; a program that implements a working solution to a problem - Develop a program that extends.
Analyze the differing cultural perspectives on policing : How have the cultural perspectives of each country had an impact on their legal traditions?
Explain purpose of the proposal is to persuade : The purpose of the proposal is to persuade my reader to believe that I am interested in the topic and ready to learn how to develop the topic into a Project.
Research the most appropriate routes and all modes : Calculate are the total costs of each method of shipping?Without the holding costs (opportunity cost of capital)?
Calculate the dividends per share on each class of stock : Calculate the dividends per share on each class of stock for each of the four years. Round all answers to two decimal places

Reviews

len1590202

8/4/2017 3:31:46 AM

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

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