Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class EncapTest {
- private String num;
- private String brand;
- private String model;
- private String status;
- private int price;
- public String getNum() {
- return num;
- }
- public String getBrand() {
- return brand;
- }
- public String getModel() {
- return model;
- }
- public String getStatus() {
- return status;
- }
- public double getPrice() {
- return price;
- }
- public void setNum(String num) {
- this.num = num;
- }
- public void setBrand(String brand) {
- this.brand = brand;
- }
- public void setModel(String model) {
- this.model = model;
- }
- public void setStatus(String status) {
- this.status = status;
- }
- public void setPrice(int price) {
- this.price = price;
- }
- public void priceDecider(String brand, int price) {
- if (this.brand == "Honda") {
- this.price = 9000;
- } else if(this.brand == "Hyundai") {
- this.price = 9000;
- } else if(this.brand == "Mitsubishi") {
- this.price = 8500;
- } else if(this.brand == "Nissan") {
- this.price = 8000;
- } else if(this.brand == "Toyota") {
- this.price = 7500;
- } else {
- this.price = 10000;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement