Advertisement
KechevD

oop.phone_1

Feb 17th, 2019
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. public class program {
  2.  
  3. public static void main(String[] args) throws Exception {
  4. phone myPh = new phone();
  5. myPh.brand = "Samsung";
  6. myPh.color = "black";
  7. myPh.battery = 4000;
  8. myPh.power = 1564;
  9. myPh.printInfo();
  10.  
  11. phone yourPh = new phone();
  12. yourPh.brand = "Apple";
  13. yourPh.color = "white";
  14. yourPh.battery = 980;
  15. yourPh.power = 170;
  16. yourPh.put(1000);
  17. yourPh.printInfo();
  18.  
  19.  
  20. }
  21. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement