Extracted text: QUESTION 32 Create a Job class that has 3 properties: JobNumber, Hours, and Price for the job. You need to use an auto- implemented property for JobNumber, and provide get and set accessors for Hours. The price field value is calculated as the hours times $30 whenever the hours values is set. The Price property is read-only. Create a constructor that requires parameters for the job number and hours only. Also, include a ToString() method that overrides the Object class's ToString() method and returns a string that contains the class name (using GetType() and the job's data field values. Then create a UrgentJob class that derives from the Job class. The UrgentJob class has an auto-implemented property, ExtraCharge; which holds an additional charge for the urgent job. For the UrgentJob class, create a constructor that accepts the job number, hours, and extra charge. Also, override the Object class's ToString() method and return a string that contains the class name and all data field values, including the total price (price + extra charge). Finally, create an application class named JobDemo that instantiates one Job object and one UrgentJob object. Then call the ToString() method to display the info of each object on the screen. Attach File Browse Local Files Browse Content Collection
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here