Advertisement
Vasilena

CarStore

Oct 14th, 2021
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 2.33 KB | None | 0 0
  1. //Car
  2. public class Car {
  3.     String brand;
  4.     String model;
  5.     int year;
  6.     double price;
  7.     String color;
  8.  
  9.     public Car(String brand, String model, int year, double price, String color){
  10.         this.brand = brand;
  11.         this.model = model;
  12.         this.year = year;
  13.         this.price = price;
  14.         this.color = color;
  15.     }
  16.  
  17.     public String getBrand(){
  18.         return brand;
  19.     }
  20.  
  21.     public void setBrand(String brand){
  22.         this.brand = brand;
  23.     }
  24.  
  25.     public String getModel() {
  26.         return model;
  27.     }
  28.  
  29.     public void setModel(String model) {
  30.         this.model = model;
  31.     }
  32.  
  33.     public int getYear() {
  34.         return year;
  35.     }
  36.  
  37.     public void setYear(int year) {
  38.         this.year = year;
  39.     }
  40.  
  41.     public double getPrice() {
  42.         return price;
  43.     }
  44.  
  45.     public void setPrice(double price) {
  46.         this.price = price;
  47.     }
  48.  
  49.     public String getColor() {
  50.         return color;
  51.     }
  52.  
  53.     public void setColor(String color) {
  54.         this.color = color;
  55.     }
  56. }
  57.  
  58.  
  59. ////////////////////////////////////////////////////////////////////////////////////////////
  60.  
  61. //Store
  62.  
  63. import java.util.ArrayList;
  64.  
  65. public class Store {
  66.     String name;
  67.     String adress;
  68.     ArrayList<Car> arrCar = new ArrayList<>();
  69.     ArrayList<JobAplication> aplicants = new ArrayList<>();
  70. }
  71.  
  72. //////////////////////////////////////////////////////////////////////////////////////////////
  73.  
  74. //JobAplication
  75. public class JobAplication {
  76.     String name;
  77.     double experience;
  78.     String position;
  79.     String education;
  80.  
  81.  
  82.     public JobAplication(String name, double experience, String position, String education){
  83.         this.name = name;
  84.         this.experience = experience;
  85.         this.position = position;
  86.         this.education = education;
  87.     }
  88.  
  89.     public String getName(){
  90.         return name;
  91.     }
  92.  
  93.     public double getExperience() {
  94.         return experience;
  95.     }
  96.  
  97.     public String getPosition() {
  98.         return position;
  99.     }
  100.  
  101.     public String getEducation() {
  102.         return education;
  103.     }
  104.  
  105.     public boolean requirments(double experience, String education, String position){
  106.         if(experience > 1 && education.equals("средно") || education.equals("висше")){
  107.  
  108.         }else{
  109.  
  110.         }
  111.         return ;
  112.     }
  113. }
  114.  
  115.  
  116.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement