{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

Assignments - and a salary(a double Provide a constructor...

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

View Full Document Right Arrow Icon
Turingcraft Exercise -2 Please submit .java files for each of the following problems. Remember to insert COMMENTS. Programs without comments will not be accepted. Please submit a zip file which contains all the files to WebCT. Deadline of submission: Midnight, Oct 11, 2010 Questions: P3.1 Write a BankAccountTester class whose main method constructs a bank account, deposits $1000, withdraw $500, withdraws another $400, and the points the remaining balance. Also print the expected result. P3.6 Implement a class Employee . An employee has a name (a string) and a salary
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: and a salary (a double). Provide a constructor with two parameters Public Employee(String employeeName, double currentSalary) And methods public String getName() public double getSalary() public void raiseSalary(double byPercent) These methods return the name and salary, and raise the employee’s salary by a certain percentage. Simple usage: Employee harry = new Employee(“Hacker, Harry”, 50000); Harry.raiseSalary(10); //Harry gets a 10% raise Supply an EmployeeTester class that tests all methods....
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online