Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Create an application named JobDemo that declares and uses Job objects. The Job classholds job information for a home repair service. The class has five

Create an application named JobDemo that declares and uses Job objects. The Job classholds job information for a home repair service. The class has five properties that include:

JobNumber - The job number

Customer - The customer name

Description - The job description

Hours - The estimated hours

price - The price for the job

Create a constructor that requires parameters for all the data except price. Include auto-implemented properties for the job number, customer name, and job description, but not for hours or price; the pricefield value is calculated as estimated hours times $45.00 whenever the hours value is set.

Also create the following for the class:

An Equals() method that determines two Jobs are equal if they have the same job number

A GetHashCode() method that returns the job number

A ToString() method that returns a string containing all job information in the following format:

Job 111 Smith exterior paint 20 hours @$45.00 per hour. Total price is $900.00 

The JobDemo application declares a few Job objects, sets their values, and demonstrates that all the methods work as expected.

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

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

More Books

Students also viewed these Databases questions

Question

What is the most important part of any HCM Project Map and why?

Answered: 1 week ago