Abstraction using Interfaces The purpose of this lab is for you to learn how to achieve abstraction in Java using interfaces. These have the advantage over abstract classes in that we have "multiple inheritance" safely. Java does not allow multiple inheritance of classes directly due to the "Diamond Problem." Steps: • Create the file "Lab03.java" in your Eclipse Package Explorer inside of your Main package. • For this assignment, you will do ALL of your coding in the "Lab03.java" file. Follow the specifications below to get full credit for the assignment: Lab 3 Specifications Create a single Java code file (Lab03.java) that contains: Three separate interfaces: • One that uses unimplemented methods (just method prototypes) • One that uses a default method or methods • One that uses a static method Create your main class (Lab03) that implements ALL 3 of these interfaces. Write the implementation for the methods in the first interface mentioned above in your main method. Write the main method that uses all of the methods in the 3 interfaces. Hints *Use the class code as a guide to help you figure out how this all works. Do NOT copy the class code for the assignment. Come up with your own interface ideas but simply use class code as an outline for how the flow can go. Don't forget (in the main method) to create an object of the Lab03 class to access interface methods! Submission Upload the source file "Lab03.java" to Canvas by the due date and time for credit. ANY ERRORS IN COMPILING WILL RESULT IN POINT DEDUCTIONS IF MINOR OR ZERO POINTS IF SEVERE. THE PROGRAM MUST BE ABLE TO COMPILE WITHOUT MODIFICATION FOR FULL CREDIT!

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question
Abstraction using Interfaces
The purpose of this lab is for you to learn how to achieve abstraction in Java using interfaces. These have the advantage
over abstract classes in that we have "multiple inheritance" safely. Java does not allow multiple inheritance of classes
directly due to the "Diamond Problem."
Steps:
• Create the file "Lab03.java" in your Eclipse Package Explorer inside of your Main package.
• For this assignment, you will do ALL of your coding in the "Lab03.java" file. Follow the specifications below to get full
credit for the assignment:
Lab 3 Specifications
Create a single Java code file (Lab03.java) that contains:
Three separate interfaces:
• One that uses unimplemented methods (just method prototypes)
• One that uses a default method or methods
• One that uses a static method
Create your main class (Lab03) that implements ALL 3 of these interfaces.
Write the implementation for the methods in the first interface mentioned above in your main method.
Write the main method that uses all of the methods in the 3 interfaces.
Hints
*Use the class code as a guide to help you figure out how this all works. Do NOT copy the class code for the
assignment. Come up with your own interface ideas but simply use class code as an outline for how the flow can go.
Don't forget (in the main method) to create an object of the Lab03 class to access interface methods!
Submission
Upload the source file "Lab03.java" to Canvas by the due date and time for credit.
ANY ERRORS IN COMPILING WILL RESULT IN POINT DEDUCTIONS IF MINOR OR ZERO POINTS IF SEVERE. THE
PROGRAM MUST BE ABLE TO COMPILE WITHOUT MODIFICATION FOR FULL CREDIT!
Transcribed Image Text:Abstraction using Interfaces The purpose of this lab is for you to learn how to achieve abstraction in Java using interfaces. These have the advantage over abstract classes in that we have "multiple inheritance" safely. Java does not allow multiple inheritance of classes directly due to the "Diamond Problem." Steps: • Create the file "Lab03.java" in your Eclipse Package Explorer inside of your Main package. • For this assignment, you will do ALL of your coding in the "Lab03.java" file. Follow the specifications below to get full credit for the assignment: Lab 3 Specifications Create a single Java code file (Lab03.java) that contains: Three separate interfaces: • One that uses unimplemented methods (just method prototypes) • One that uses a default method or methods • One that uses a static method Create your main class (Lab03) that implements ALL 3 of these interfaces. Write the implementation for the methods in the first interface mentioned above in your main method. Write the main method that uses all of the methods in the 3 interfaces. Hints *Use the class code as a guide to help you figure out how this all works. Do NOT copy the class code for the assignment. Come up with your own interface ideas but simply use class code as an outline for how the flow can go. Don't forget (in the main method) to create an object of the Lab03 class to access interface methods! Submission Upload the source file "Lab03.java" to Canvas by the due date and time for credit. ANY ERRORS IN COMPILING WILL RESULT IN POINT DEDUCTIONS IF MINOR OR ZERO POINTS IF SEVERE. THE PROGRAM MUST BE ABLE TO COMPILE WITHOUT MODIFICATION FOR FULL CREDIT!
Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Introduction to Interface
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education