CSC113_Lab7 - +Staff(s:Staff) +getter/Setter()...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011, February 21, 2011 Lab #7 : Interface and Abstract classes A Company has the staff working part time as well as full time with the following rules 1. Full time staff are charged 500 SR per hour working 8 hours a day 2. Part time staff are charged 250 SR per hour working 2 hours a day While you are implementing your program, consider the following: - Protect any method that is not intended to be overridden, from being overridden by subclasses. - Protect any concrete class from being inherited. { Interface} Charges +charge(nofdays:int):double +display() : Void Staff # id:int #name:String +Staff(ids:int,sname:String)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: +Staff(s:Staff) +getter/Setter() +Display():void Parttime +Parttime(ids:int,sname:String) +Parttime(p:Parttime) +Charge(noofdays:int):double Fulltime +Fulltime(ids:int,sname:String) +Fulltime(p:Fulltime) +Charge(noofdays:int):double King Saud University College of Computer and Information Systems, Department of Computer Science CSC 113: Java Programming-II, Spring2011, February 21, 2011 Lab #7 : Interface and Abstract classes Write a Java Program to implement the class staff, parttime and full time with a interface In the method charge of Parttime Calculate = 250 * 2 *30 days In the method charge of Full time= 500 * 8 * 30 days Write a main class to show the static calculation. Calling all the methods...
View Full Document

This note was uploaded on 08/18/2011 for the course COMPUTER S CSC 113 taught by Professor Dr.safwanqasem during the Spring '11 term at King Saud University.

Page1 / 2

CSC113_Lab7 - +Staff(s:Staff) +getter/Setter()...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online