Cloud Stack Ninja

I’m having a goofy issue. I’m trying to see if I can printout the restaurants and employees data I have here and I can’t remember how best to do it this.

Once I can figure out how to do that, I’ll be able to create methods using it, but I can’t seem to remember how to do it this way.

Updated Code

class Main {
    public static void main(String[] args) {
        Employee john = new Employee("John","asian",35.00);
        Employee sam = new Employee("Sam","Greek",25.00);
        Employee michael = new Employee("Michael","Italian",50.00);

        Restaurant asian = new Restaurant("Asian","asian",25.00);
        Restaurant greek = new Restaurant("greek","greek",25.00);
        Restaurant italian = new Restaurant("italian","italian",25.00);


    }

    public static class Restaurant {

        private String restaurantName;
        private String cuisine;
        private double price;

        public Restaurant( String restaurantName,
                           String cuisine,
                           double price) {

            this.restaurantName = restaurantName;
            this.cuisine = cuisine;
            this.price = price;
        }

        public String getRestaurantName() {
            return restaurantName;
        }

        public String getCuisine() {
            return cuisine;
        }

        public double getPrice() {
            return price;
        }
    }

    public static class Employee {

        private String employeeName;
        private String cuisine;
        private double budget;

        public Employee(String employeeName,
                        String cuisine,
                        double budget) {

            this.employeeName = employeeName;
            this.cuisine = cuisine;
            this.budget = budget;
        }

        public String getEmployeeName() {
            return employeeName;
        }

        public String getCuisine() {
            return cuisine;
        }

        public double getBudget() {
            return budget;
        }
    }
}
%d bloggers like this: