Exercise
4 ?Constructor method
Add to your Person class from Exercise
3 ?Class definition a constructor that requires arguments of age and name,
and uses these arguments to set the initial values of these variables.
Discussion
of Exercise 4
Back
to content
RITSEC - Global Campus
Copyright © 1999 RITSEC- Middlesex
University. All rights reserved.
webmaster@globalcampus.com.eg
|