Closed AsmaNasir47 closed 3 years ago
package Exercise;
public class Class3 {
String kettle = "kettle";
String heat = "heat water";
String warm = "keep water warm";
void printKettle() {
System.out.println(kettle);
}
void prinHeat() {
System.out.println(heat);
}
void printWarm() {
System.out.println(warm);
}
}
package Exercise;
public class Main {
public static void main(String[] args) {
Class2 b = new Class2();
b.printPhone();
b.printMakeCall();
b.printPlayGame();
Class3 c = new Class3();
c.printKettle();
c.prinHeat();
c.printWarm();
}
}
package Exercise;
public class Class2 {
String phone = "iPhone"; String makecall = "make a call"; String playgame = "play games";
}