Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //
- // Source code recreated from a .class file by IntelliJ IDEA
- // (powered by Fernflower decompiler)
- //
- package softUniParking;
- public class Car {
- private String make;
- private String model;
- private int horsePower;
- private String registrationNumber;
- public Car(String make, String model, int horsePower, String registrationNumber) {
- this.make = make;
- this.model = model;
- this.horsePower = horsePower;
- this.registrationNumber = registrationNumber;
- }
- public String getMake() {
- return this.make;
- }
- public void setMake(String make) {
- this.make = make;
- }
- public String getModel() {
- return this.model;
- }
- public void setModel(String model) {
- this.model = model;
- }
- public int getHorsePower() {
- return this.horsePower;
- }
- public void setHorsePower(int horsePower) {
- this.horsePower = horsePower;
- }
- public String getRegistrationNumber() {
- return this.registrationNumber;
- }
- public void setRegistrationNumber(String registrationNumber) {
- this.registrationNumber = registrationNumber;
- }
- public String toString() {
- return String.format("Make: %s%nModel: %s%nHorsePower: %d%nRegistrationNumber: %s", this.make, this.model, this.horsePower, this.registrationNumber);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement