Professional Documents
Culture Documents
Lab 05
Lab 05
ITECH 7201
Laboratory 5
Task 1
Consider the following class diagram
Consider the following declarations. Decide whether these declarations are legal or will cause a compiler
error message. Explain your answers. For each declaration, explain which is the type and which is the
object.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
f) Animal animal = new Animal ( ); // Note the class name on the CD is in italics
______________________________________________________________________________
______________________________________________________________________________
Practice a few more of these to make sure that you have got the idea.
2/ Consider the following declarations. What methods are available to each (ignore the Object
class)? Explain your answer.
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
______________________________________________________________________________
Task 2
If you haven’t done so already, download the assignment one specifications from Moodle and start planning
how you will approach it. Set up an Enterprise Architect document and an Eclipse project for this assignment.
Read the assignment specifications very carefully. If there is anything you feel you would like explained more
carefully, let your lecturer/tutor know as soon as possible