Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 7 Polymorphism.

Similar presentations


Presentation on theme: "Chapter 7 Polymorphism."— Presentation transcript:

1 Chapter 7 Polymorphism

2 Topic Outline Polymorphism Concept Abstract classes and methods
Method overriding Array of superclasses Interfaces Vs. Astract classes

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

18

19

20

21

22

23

24

25 This program shows how to use abstract class

26

27

28

29

30

31

32

33

34

35

36

37

38

39

40

41

42

43

44

45

46

47

48

49

50

51 Summary

52 Exercise Create an abstract class called Student. The Student class includes a name and a Boolean value representing full-time status. Include an abstract method to determine the tuition fee. A full-time students paying RM2,000, and a part-time students paying RM200 per credit hour. Create the subclasses called FullTime and PartTime. Create an application program to create objects of both subclasses.


Download ppt "Chapter 7 Polymorphism."

Similar presentations


Ads by Google