Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Q1 criteria: - Correct calculation & display; see format/pattern in the document - Able to accept & process valid numeric types, e.g., 0, 100, 456.78

Q1 criteria: - Correct calculation & display; see format/pattern in the document - Able to accept & process valid numeric types, e.g., 0, 100, 456.78 - Should not allow input of negative numbers - Uses while-loop only, no for/foreach/do-while/goto - Will keep on running until -1 is entered - Shows 'Goodbye!' when ended

Q2 criteria: - Correct calculation & display; see format/pattern in the document - Uses for-loop only, no while/do-while/foreach/goto - Method 'calculatePosition' is existing - No loop inside calculatePosition - No display (Write/WriteLine/etc) inside calculatePosition.

Its the programming C#.Net

Please help me in these questions. This is the all the information that i have.

Thank You

image text in transcribedimage text in transcribed

image text in transcribed

AutoSave A Assignment 2 - Protected View - Saved to this PC- Search Amandeep Kaur AK Share Comments File Home Insert Draw Design Layout References Mailings Review View Help O PROTECTED VIEW Be careful files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Question 1 (2.5 marks): Enable Editing X A dental Equipment Company pays its sales employees on a commission basis. The monthly salary of the sales employee is $1,000 plus 8% of their gross sales for that month. For example, a salesperson who sells $10,000 worth of Diamond instruments for dentists in a month receives 1,000 plus 8% of $10,000, or a total of $1,800. Write a program that uses a while statement to input each salesperson's gross sales for last month and calculates and displays that salesperson's earnings. Process one salesperson's figures at a time. To stop the program the user type "-1" and display the message "Goodbye!". Enter sales in dollars (-1 to end): 5000 Salary is: $1400.00 Enter sales in dollars (-1 to end): 8000 Salary is: $1640,00 Enter sales in dollars (-1 to end): 9000 Salary is: $1720.00 $ Question 2 [2.5 marks]: The goal of this assignment is to create a C# program that calculates the position of the particle over a time. Consider the position of a particle moving along the x-axis is given by Page 1 of 2 258 words Focus BE + + 100% 1 Type here to search O o ENG 11:22 PM 2021-03-11 AutoSave A Assignment 2 - Protected View - Saved to this PC- Search Amandeep Kaur AK File Insert Share Comments Enable Editing X Home Draw Design Layout References Mailings Review View Help O PROTECTED VIEW Be careful files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. Consider the position of a particle moving along the x-axis is given by X(t)=4.0-2.00 where t is time in second. 1. Write a method named calculate Position that accepts as argument time of double type. The method calculates and returns the position of the particle. Use the above equation. 2. Starting from t=0.0 to t=20.0 seconds, repeatedly: Call calculate Position method using a for-loop and display the time and the returned position of the particle The output should look like: Time Position Page 1 of 2 258 words Focus BE + 1006 1 Type here to search o o ENG 11:22 PM 2021-03-11 AutoSave A Assignment 2 - Protected View - Saved to this PC- Search Amandeep Kaur AK Share Comments File Home Insert Draw Design Layout References Mailings Review View Help O PROTECTED VIEW Be careful files from the Internet can contain viruses. Unless you need to edit, it's safer to stay in Protected View. 2. Starting from t=0.0 to t=20.0 seconds, repeatedly: Enable Editing X Call calculate Position method using a for-loop and display the time and the returned position of the particle The output should look like: Time Position 0.0 1.0 4.0 2.0 20.0 -36.0 Page 2 of 2 258 words Focus BE + + 100% 1 Type here to search O ' . po 0 ENG 11:23 PM 2021-03-11

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Principles Of Multimedia Database Systems

Authors: V.S. Subrahmanian

1st Edition

1558604669, 978-1558604667

More Books

Students also viewed these Databases questions