Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 2

hamzamac@live.com http://issuu.

com/hamzamac

College Of Informatics and Virtual Education

NAME: Makame, Makame H PROGRAM: B Sc. Computer and Information Security COURSE NAME: Object Oriented Programing in Java COURSE CODE: CS 207 PART: Abstract classes

Problem Descriptions: This program code demonstrates on how to create and use abstract classes. An abstract class declares common attributes and behaviors of the various classes in a class hierarchy. An abstract class typically containing one or more abstract methods that subclasses must override if subclasses are to be concrete. The instance variables and the concrete methods of an abstract class are subjected to the normal rules of inheritance. The code consist of three classes MyAbs class is an abstract as it contains an abstract method drawRect() and other non-abstract methods Abs extends the abstract class MyAbs, this class is not abstract since it has implemented the abstract method drawRect() of its super class, otherwise it has to be abstract. o It use the key word super to call the super constructor. The Main class in which Abs class objects is created and used.

Wednesday, August 08, 2012

hamzamac@live.com http://issuu.com/hamzamac

Wednesday, August 08, 2012

You might also like