Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

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

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M92398915
  • Price:- $80

Guranteed 48 Hours Delivery, In Price:- $80

Have any Question?


Related Questions in Programming Language

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Extend the adworks applicationi add dialogs to allow the

Extend the AdWorks application I. Add Dialogs to allow the user to Add, Edit, Read and Delete a Customer and refresh the view accordingly. 1. The user should be able to select a specific customer from the DataGrid and cl ...

Question 1 what is hadoop explaining hadoop 2 what is

Question: 1. What is Hadoop (Explaining Hadoop) ? 2. What is HDFS? 3. What is YARN (Yet Another Resource Negotiator)? The response must be typed, single spaced, must be in times new roman font (size 12) and must follow t ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Question 1 what is a computer program what is structured

Question: 1. What is a Computer program? What is structured programming? 2. What is modular programming? Why we use it? 3. Please evaluate Sin (x) by infinite series. Then write an algorithm to implement it with up to th ...

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

1 write a function named check that has three parameters

1. Write a function named check () that has three parameters. The first parameter should accept an integer number, andthe second and third parameters should accept a double-precision number. The function body should just ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Structs and enumsoverviewin this task you will create a

Structs and Enums Overview In this task you will create a knight database to help Camelot keep track of all of their knights. Instructions Lets get started. 1. What the topic 5 videos, these will guide you through buildi ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As