Ản interface has the following prototypes. public interface Array{ int size=10; public void display(); // display the values of the array public int check (int num); // return 1 if num is found in the array, otherwise return 0 public void add (int num); // add unique elements in the array Define class ImpArray which do the following: 1. provide implementation of the interface Array. 2. Define an integer array and int count as attributes. 3. Provide a default constructor and create your array using the size defined in interface Array. For example: Test Result ImpArray arz = new ImpArray ();o arr.display(); O O O O
Ản interface has the following prototypes. public interface Array{ int size=10; public void display(); // display the values of the array public int check (int num); // return 1 if num is found in the array, otherwise return 0 public void add (int num); // add unique elements in the array Define class ImpArray which do the following: 1. provide implementation of the interface Array. 2. Define an integer array and int count as attributes. 3. Provide a default constructor and create your array using the size defined in interface Array. For example: Test Result ImpArray arz = new ImpArray ();o arr.display(); O O O O
Chapter11: Advanced Inheritance Concepts
Section: Chapter Questions
Problem 10PE
Related questions
Question
IMPLEMENT THE JAVA
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
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.Recommended textbooks for you
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,