Ask Experts Questions for FREE Help !
Ask
    nomasana's Avatar
    nomasana Posts: 2, Reputation: 1
    New Member
     
    #1

    Oct 23, 2013, 04:43 PM
    Java help please
    15 points: Correct the errors in the following classes. Class1 must remain/become abstract and Class2 must remain/become concrete. All errors must be corrected.
    Public abstract class Class1 {
    Private int x;
    Protected int y;

    Public Class1(int x) {
    This.x = x;
    Y = 2;
    }

    Public doWorkA();

    Public abstract doWorkB() {
    System.out.println(x);
    }
    }

    Public class Class2 extends Class1 {
    Public Class2(int a) {
    Super();
    Y = 3;
    }

    Public static void main(String[] s) {
    Class1 c1 = new Class1(1);
    Class2 c2 = new Class2(1);
    C1.doWorkA();
    C2.doWorkB();
    }
    }

Check out some similar questions!

Java netbeans program- Connection between java and mysql,How to conn [ 0 Answers ]

which I wrote from a book but when I run it, it shows exception please give me the code to connect jlistbox to database when I click on btn1. btn coding should search "name" in database and shows all the names in listbox my coding: here-- r1,r2,r3 are radio btns and l1,l2,l3 are labels,...

In java … help me [ 0 Answers ]

In java: write a program that asks fot a letter that represents a day of the week and prints thr whole day's name.In case's' is entered thr program must ask for the next letter to determine if the day is Saturday or Sunday; The same must be done for the letter 't'

Something about java [ 1 Answers ]

Halo, I want to ask something about java question, some question had confuse, I need some hints, someone help me please, thank you! Calculate the value of π from the infinite series. Π = 4 – 4/3 +4/5 - 4/7 + 4/9 - 4/11 + …… Print a table that shows the value of π using...


View more questions Search
 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.