Advertisement
sergAccount

Untitled

Dec 20th, 2020
602
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.68 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.ja11;
  7.  
  8. public class Engine {
  9.    
  10.     private double power;
  11.     private String name;
  12.  
  13.     public Engine(double power, String name) {
  14.         this.power = power;
  15.         this.name = name;
  16.     }
  17.  
  18.     public double getPower() {
  19.         return power;
  20.     }
  21.  
  22.     public void setPower(double power) {
  23.         this.power = power;
  24.     }
  25.  
  26.     public String getName() {
  27.         return name;
  28.     }
  29.  
  30.     public void setName(String name) {
  31.         this.name = name;
  32.     }
  33. }
  34.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement