Find the Error. interface DAO{ public double getMax(); public abstract double getAverage(); } abstract class Human{         public abstract void study();         public void showValue(Number i){                   System.out.println(i);          } } class B extends Human implements DAO{ public void study() {         System.out.println("Study OOP"); } public double getMax() {         return 30; } public double getAverage() {       return 14.5; } @Override public void getAccess() {          System.out.println("233"); } } public class AbstractionAndInterface { public static void main(String[] args) { Human h = new B(); double res = h.getMax(); System.out.println(res); B b = new B(); System.out.println(b.getAverage()); b.getAccess(); } }   public interface DAO2 { public void getAccess(); public abstract void printOutput(); }

Microsoft Visual C#
7th Edition
ISBN:9781337102100
Author:Joyce, Farrell.
Publisher:Joyce, Farrell.
Chapter9: Using Classes And Objects
Section: Chapter Questions
Problem 19RQ
icon
Related questions
Question

Find the Error.

interface DAO{

public double getMax();
public abstract double getAverage();
}

abstract class Human{

        public abstract void study();
        public void showValue(Number i){
                  System.out.println(i);
         }
}

class B extends Human implements DAO{

public void study() {
        System.out.println("Study OOP");
}

public double getMax() {
        return 30;
}

public double getAverage() {
      return 14.5;
}

@Override
public void getAccess() {
         System.out.println("233");
}
}

public class AbstractionAndInterface {
public static void main(String[] args) {

Human h = new B();
double res = h.getMax();
System.out.println(res);

B b = new B();
System.out.println(b.getAverage());
b.getAccess();
}
}

 

public interface DAO2 {

public void getAccess();

public abstract void printOutput();

}

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Class
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
Microsoft Visual C#
Microsoft Visual C#
Computer Science
ISBN:
9781337102100
Author:
Joyce, Farrell.
Publisher:
Cengage Learning,
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT