private int nVoltage = 0;
public int getVoltage() { return nVoltage;}
publi void getSize(){}
}
class TV extends Electronics {
private int nSize = 0; //7
public void setSize(int new_size){}//8
public int getSize() { return nSize;}//9
}
public class Test5{
public static void main(String args[]){
Electorinics elec;
Tv tv = new TV();
elec = tv;//15
elec.getSize();//16
elec.setSize();//17
tv.getSize();//18
tv.setSize(5);
}
}
class Account{//1
private int total = 0;
void deposit(int amount){//3
int temp = total;
for (int i=0; i<10000000; i++){}
total = temp + amount;
}
int getTotal(){return total;}
}
class Customer extends Thread{//10
Account account;
Customer(Account account){this.account = account;}
public void run(){
account.deposit(1000);
}
}
class TVContribution{//17
public static void main(String args[]){//18
Account account = new Account();
Thread t1 = new Customer(account);
Thread t2 = new Customer(account);
Thread t3 = new Customer(account);
t1.start(); t2.start(); t3.start(); //24 System.out.println(account.getTotal());