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

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 employees 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

This note was uploaded on 11/10/2010 for the course PROGRAMMIN 2860U taught by Professor Saman during the Fall '10 term at UOIT.

Ask a homework question - tutors are online