Assignment4-AbstractInterfacePolymorphismStudentFall2019.docx - COMP 2150 – Spring 2019 Homework 4 Abstract/Interface/Polymorphism(73 points Number of

Assignment4-AbstractInterfacePolymorphismStudentFall2019.docx

This preview shows page 1 - 2 out of 4 pages.

COMP 2150 – Spring 2019 Homework 4: Abstract/Interface/Polymorphism (73 points) Objectives: : Abstract/Interface/Polymorphism (1) (10 points) This question is about working with abstract class in Java program. Create two classes (A and B) with A has an abstract method ( void call ( )) and B extends from A. Class A has a concrete method callA ( ) that displays “concrete method callA() in A”. B is a concrete class. Your AbstractDemo program should display the following: B’s implementation of A's call( ) . concrete method callA( ) in A (2) (10 points) This question is about implementing interface methods in java programming. Create interface A1 that has two methods (void m1 ( ), void m2 ( ) ). Create another interface B1 that extends interface A1 plus a method ( void m3( ) ) of its own. Write another Class (TheClass ) to implement interface B1. Each of the above methods (m1 ( ), m2 ( ), and m3 ( ) ) displays a message about the method. For example m1( ), when invoked (aka called ) will display “ implement m1 ( ) “. Write an interfaceDemo class to display the3 messages via one object. Number of People: Individual. Feel free to ask me for help, or visit the Computer Science Learning Center ( ), or visit the Fri/Sat 9 – 10 am supplemental class @DH103 Due: (Oct 6, 2019 ) (SUNDAY) 11:59 pm Submission: Zip all your Java source files (the one with .java extension) (you can zip the entire project folder if using an IDE) into a single zip file and upload it to the proper folder in the eLearn dropbox at . Coding Style: (use the Format tool in Eclipse) . Use standard Java naming conventions for variableAndMethodNames , ClassNames , CONSTANT_NAMES . You must have comments for all your codes. Comments should focus on what and why and NOT how.
Image of page 1
Image of page 2

You've reached the end of your free preview.

Want to read all 4 pages?

  • Fall '08
  • Staff

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern

Stuck? We have tutors online 24/7 who can help you get unstuck.
A+ icon
Ask Expert Tutors You can ask You can ask ( soon) You can ask (will expire )
Answers in as fast as 15 minutes
A+ icon
Ask Expert Tutors