rangga_hrdme

OOP-JAVA:CLASS2_INHERITANCE

May 5th, 2021
291
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. public class Factory extends Laptop {
  2.  
  3.     public static void main(String[] args) {
  4.         Laptop apple = new Laptop("china", "macbook pro", "64gb", "m1", "radeon");
  5.         apple.printLaptop();
  6.     }
  7.  
  8.     public Factory(String country, String mark, String ram, String proceSsor, String graphic) {
  9.         super(country, mark, ram, proceSsor, graphic);
  10.     }
  11. }
  12.  
Advertisement
Add Comment
Please, Sign In to add comment