I have to create a program which has a list of houses. In this houses there has to be this information: direction, zipcode, number of rooms and the square meters of the house. One of my biggest problems is that this information has to be segmented. So, first the list of directions have to be shown, then the list of zipcodes, then the number of rooms...
I created a class House and I set the String variables for each one (direction, zipcode, number of rooms and the square meters of the house).
I know that I should be using arrays, for and objects but It's my first assignment and I am really lost on how or where should I start.
I really want to learn how to do it, so if you have any idea, tip or suggestion I would appreciate it. I don't want people to do my assignment I just want to know how can I get started. thank you!
This is my code so far:
package ejerciciofinalt3;
public class HouseExercise {
public static void main(String[] args) {
// TODO Auto-generated method stub
House house1 = new House();
house1.showHouseInfo();
house1.direction = "abc";
house1.postCode = "08397";
house1.roomNumber = "4";
house1.squareMeter = "100";
house1.showHouseInfo();
}
}