APlusGrades

Not Rated (0)

$15/per page/Negotiable

About APlusGrades

Levels Tought:
Elementary,Middle School,High School,College,University,PHD

Expertise:
Accounting,Algebra See all
Accounting,Algebra,Applied Sciences,Architecture and Design,Art & Design,Biology,Business & Finance,Calculus,Chemistry,Communications,Computer Science,Economics,Engineering,English,Environmental science,Essay writing,Foreign Languages,Geography,Geology,Health & Medical,HR Management,Law,Management,Physics,Programming,Science,Statistics Hide all
Teaching Since: Jul 2017
Last Sign in: 364 Weeks Ago, 2 Days Ago
Questions Answered: 1850
Tutorials Posted: 1850

Education

  • Graduate in Biology and Nutrition, MBA Finance
    Florida State University
    Aug-2000 - Jul-2007

Experience

  • Ass. Relationship Manager
    Penn-Florida
    Mar-2009 - Feb-2016

Category > Programming Posted 19 Jul 2017 My Price 14.00

Creating and catching Exceptions in C# (files attached) Modify the car object to throw 3 new exceptions [1] Modify the StartEnginemethod: Change the

Creating and catching Exceptions in C# (files attached)

Modify the car object to throw 3 new exceptions

[1] Modify the StartEnginemethod: 

Change the logic to support If they do a start when the engine is already started:

You throw new ApplicationException(someAppropriateErrorMsg)

[2] Modify the StopEngine method: 

Change the logic to support If they do a stop engine when the speed is not zero:

You throw new ApplicationException(someAppropriateErrorMsg)

[3] Change the accelerate method such that if they call it when the engine is not running:

You throw new ApplicationException(someAppropriateErrorMsg) (And do not to change the speed) (Braking works if the engine is on or off, so no change needed)

[4] If you run your program now, and do 3 nonsensical things (trying to accelerate when the engine is not running, trying to start the engine when it is already started, and trying to stop the engine when it is already stopped, the system should pop up "uncaught exception" boxes.  When you have all 3 "throws"working, then move to modify the console program, program.cs:

So now modify the 3 appropriate cases of your switch statements by adding a Try Catch to each one of them. Now when you do the 3 nonsense things, you should catch the errors and take the returned errormessage (from your throw code over in the car class) and write them into the ErrorMessage variable.

[5] Modify other "correct" paths (when no problem is encountered)  to overwrite any previous value in the ErrorMessage variable with the message  "All is well" such that the errors go away after the usermoves on and does something that is not an error. In other words, the status message should always be showing current correct status.

Do not add Console.WriteLines statements other places then where they already are.

Attachments:

Answers

Not Rated (0)
Status NEW Posted 19 Jul 2017 09:07 AM My Price 14.00

Hel-----------lo -----------Sir-----------/Ma-----------dam----------- Â-----------  -----------Tha-----------nk -----------you----------- fo-----------r u-----------sin-----------g o-----------ur -----------web-----------sit-----------e a-----------nd -----------acq-----------uis-----------iti-----------on -----------of -----------my -----------pos-----------ted----------- so-----------lut-----------ion-----------.Pl-----------eas-----------e p-----------ing----------- me----------- on----------- ch-----------at -----------I a-----------m Â----------- on-----------lin-----------e o-----------r i-----------nbo-----------x m-----------e a----------- me-----------ssa-----------ge -----------I

Not Rated(0)