public Employee (){ number =0; name=“”;}

Post on 24-Feb-2016

31 views 1 download

Tags:

description

Note: Add a default constructor. public Employee (){ number =0; name=“”;}. Note: The default constructor is called as the first statement in the subclass constructor. Include this part in the subclass constructor. in branNA : String. in bankNA : String. Note: - PowerPoint PPT Presentation

Transcript of public Employee (){ number =0; name=“”;}

1

2

3

4

5

6

7

8

9

10

11

12

13

public Employee (){number =0;name=“”;}

Note:Add a default constructor

Note:The default constructor is called as the first statement in the subclass constructor

14

15

16

17

18

19

20

Include this part in the

subclass constructor

21

22

23

24

25

in branNA: String

in bankNA: String

26

Note: super can be used to access the supers class methods and attributes. For example:super.getName();super.accNumber;

27