Advertisement
aznGiLL

Robot

Mar 13th, 2012
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.66 KB | None | 0 0
  1. package Tutorial;
  2.  
  3. public class Robot {
  4.    
  5.     int age;
  6.     double processingPower;
  7.     double capacity;
  8.    
  9.     Robot(int age, double processingPower, double capacity){
  10.         this.age = age;
  11.         this.processingPower = processingPower;
  12.         this.capacity = capacity;
  13.     }
  14.    
  15.     void turnOn(){
  16.         System.out.println("System turning on.");
  17.     }
  18.    
  19.     void processing(){
  20.         System.out.println("Processing ...");
  21.     }
  22.    
  23.     void displayDetails(){
  24.         System.out.println("Age             : " + age);
  25.         System.out.println("Processing Power: " + processingPower);
  26.         System.out.println("Capacity        : " + capacity);
  27.     }
  28.    
  29.     void turnOff(){
  30.         System.out.println("System shutting down.");
  31.     }
  32.    
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement