CS_InClassAssignment_216

CS_InClassAssignment_216 - salary (decimal). Your class...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
1. Modify class Account (Fig. 4.15) to provide a method called Debit that withdraws money from an Account. Ensure that the debit amount doesn’t exceed the balance. If it does, the balance should not be changed and the method should display a message indicating "Debit amount exceeded account balance." Modify class AccountTest (Fig. 4.16) to test method Debit. 2. Create a class called Employee that includes three pieces of information as either instance variables or automatic properties— a first name (type string), a last name (type string) and a monthly
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: salary (decimal). Your class should have a constructor that initializes the three values. Provide a property with a get and set accessor for any instance variables. If the monthly salary is negative, the set accessor should leave the instance variable unchanged. Write a test application named EmployeeTest that demonstrates class Employees capabilities. Create two Employee objects and display each objects yearly salary. Then give each Employee a 10% raise and display each Employees yearly salary again....
View Full Document

Ask a homework question - tutors are online