Advertisement
sergAccount

Untitled

Feb 7th, 2021
716
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.71 KB | None | 0 0
  1. /*
  2.  * To change this license header, choose License Headers in Project Properties.
  3.  * To change this template file, choose Tools | Templates
  4.  * and open the template in the editor.
  5.  */
  6. package com.mycompany.ja7;
  7.  
  8. public class Engine {
  9.    
  10.     private String name;
  11.     private double power;
  12.    
  13.     // Alt + Insert
  14.     public Engine(String name, double power) {
  15.         this.name = name;
  16.         this.power = power;
  17.     }
  18.  
  19.     public String getName() {
  20.         return name;
  21.     }
  22.  
  23.     public void setName(String name) {
  24.         this.name = name;
  25.     }
  26.  
  27.     public double getPower() {
  28.         return power;
  29.     }
  30.  
  31.     public void setPower(double power) {
  32.         this.power = power;
  33.     }
  34. }
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement