Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import java.util.Random;
- import java.util.UUID;
- public class GeneratorFlat {
- public static void main(String[] args) {
- {
- ArrayDeque<Flat> test = new ArrayDeque<>();
- String name = null;
- int year = 2000;
- int id = 0;
- double x = 45;
- float y = 45;
- int area = 0;
- double c = Math.random();
- double g = Math.random();
- String HouseName = null;
- Long numberOfRooms = null;
- long numberOfFloors = 1;
- Integer numberOfLifts = 1;
- java.time.LocalDateTime creationDate = null;
- Coordinates coordinates = new Coordinates(x,y);
- Boolean furniture = null;
- Boolean centralHeating = null;
- House house = new House(HouseName,year,numberOfFloors,numberOfLifts);
- Furnish furnish = Furnish.DESIGNER;
- for(int i = 0;i < 10; i ++){
- Flat a = new Flat(id,name,coordinates,creationDate,area,numberOfRooms,furniture,centralHeating,furnish,house);
- test.addFirst(a);
- for (int j = 0; j < 10; j ++){
- x = x + 5;
- y = y + 3;
- area = area + 15;
- numberOfRooms ++;
- numberOfFloors ++;
- numberOfLifts ++;
- id ++;
- year ++;
- creationDate = LocalDateTime.now();
- if (c > 0.5){
- furniture = true;
- } else furniture = false;
- if (g > 0.5){
- centralHeating = true;
- } else centralHeating = false;
- }
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement