COIS 2020H Lecture Notes - Lecture 1: Abstract Type, Object Copying, Jagged Array

77 views2 pages

Document Summary

In fraction class data are encapsulated as integer and inter denominator. Inside a class we write the data member or field. A parent class allows the method to be overwritten by a descendant class. A child class is dependent of its parent class and it usually involves a cast. An abstract method has no body an abstract class also allows the method t o be overwritten by a descendent class. An inheritance permits a descendant class to inherit the behaviour of its parent class. All methods in an interface are public and abstract. There are a few methods relating to interface class. A class can only have one parent class. A child class exhibits at least the same behaviour as its parent class. A class must implement all methods defined in the interface. A class may defer implementing the body of an abstract method in the parent class; hence, the descendant class is also abstract.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents