Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package Tutorial;
- public class Robot {
- int age;
- double processingPower;
- double capacity;
- Robot(int age, double processingPower, double capacity){
- this.age = age;
- this.processingPower = processingPower;
- this.capacity = capacity;
- }
- void turnOn(){
- System.out.println("System turning on.");
- }
- void processing(){
- System.out.println("Processing ...");
- }
- void displayDetails(){
- System.out.println("Age : " + age);
- System.out.println("Processing Power: " + processingPower);
- System.out.println("Capacity : " + capacity);
- }
- void turnOff(){
- System.out.println("System shutting down.");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement