Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 3a) A class that contains class member variables demonstrates a has-a-realtionship.
- 3b) Object-oriented programming requires that the solution to a task be implemented as a system of objects. In this system, objects communicate with other objects to provide a solution to the task. This approach to creating software is called object oriented development.
- 3c) The keyword this can be used to distinguish between a parameter and a member variable.
- 3d) Reusability is an important feature of object-oriented programming because it reduces development time and decreases the likelihood of bugs.
- 3e) Modular uses components that are separately written and maintained.
- 3f) When information is passed from one object to another, the object is said to be passing a message.
- 5a) Roo
- 5b) x
- 5c) getX()
- 5d) setX(int z )
- 5e) factor()
- 5f) Roo
- 5g) 4
- 6. A class is a data type that defines variables for the state of an object and methods for an object’s behaviour. An object is an instance of a class. An object stores data and can perform actions and provide communication.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement