Hello everyone i am currently working on a java program which is menu driven but i have completely stuck when entering the correct syntax in the switch case to allow each specific thing to work properly, i am really new to this so any help with the syntax would be greatly appreciated.
Here is the code i have so far
package assignment;
import java.io.*;
}
public String getPostCode(int propertyID)
{
return property[propertyID].getPostCode();
}
public String getHouseNo(int propertyID)
{
return property[propertyID].getHouseNo();
}
public String getMonthlyRent(int propertyID)
{
return property[propertyID].getMonthlyRent();
}
public int getnumberofproperties()
{
return numberofproperties;
}
}
public class Main {
public static void main(String[] args) throws IOException
{
propertyList mypropertyList = new propertyList();
int menu=0;
do
{
final BufferedReader tKeyboard = new BufferedReader(new InputStreamReader(System.in));
System.out.println("1, Add property");
System.out.println("2, Remove properties from list");
System.out.println("3, Load list of properties");
System.out.println("4, Exit the system");
System.out.print("\n Enter your choice: ");
String tLine = tKeyboard.readLine();
switch(menu)
{
case 1:
System.out.println("Please Select the postcode, house number and monthly rent to add a property");
break;
case 2:
System.out.println("Select the property that you would like to remove from your list");
break;