Module 4 Class Activity
Module 4 Class Activity
Class Activity
Module 4
1. Define the term Class and give one example of a class. (4 Marks)
Value Type:
Int Nadia = 5;
Reference Type:
Typecasting is when you assign a value of one data type to another type.
Question Two (14 Marks)
Explicit implementation: if two interfaces have a member with the same name.
Generic allows you to define a class with placeholders for the type of its fields, methods,
parameters, etc.
LinkedList<T> is a generic list in which each item is linked to the previous item and the next
item in the collection.
Generic help uses with type safety so that we can’t make any errors in the compile time.