|
-
polymorphism,code reuse and inheritance???
A leturer has been teaching a class C1 with 20 students. In order to keep a record of the students and their work, the lecturer has developed a java program that maintains the students number, full student name and student mark. The lecturer has developed a Class with methods to deal with his class.
The methods perform the following operations:
- print student records in alphabetical order
- Given the student number, print the full student record
- Find the average mark for the class
- Print the student record with the highest mark
The lecturer has been asked to teach an additional class C2 with 10 students. The lecturer has decided to take advantage of the OO feature of the existing program to provide the same operations listed above when the two classes C1 and C2 are combined.
how do i take advantage of inheritance to implement such a java program??
bahcoach
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks