Question1. Write down the class 'Ingredient' to contain the following:-
i) Integer variable: ingredient_id
ii) String variables: ingredient_name, type
iii) double-precision variable: quantity
iv) Set methods for each of the variables
v) Get methods for each variable
Question2. Write down the class 'Vegetable' to contain the following:-
i) Integer variable: vegetable_id
ii) String variable: vegetable_name
iii) Double-precision variable: cost
iv) Set methods for each data member
v) Get methods for each data member
Question3. Write down the class 'Recipe' to contain the following:-
i) Integer variable: recipe_id
ii) String variables: recipe_name, preparation_procedure
iii) double-precision variable: preparation_time
iv) An object of type Ingredient
v) An object of type Vegetable
vi) Set methods for the data members: recipe_id, recipe_name, preparation_procedure and preparation_time
vii) Get methods for the variables: recipe_id, recipe_name, preparation_procedure and preparation_time
Question4. Write down the class 'CookMeal' to perform the following:-
i) Create an object of type 'Recipe'
ii) Request the user to enter value for each data member of 'Recipe' using the input dialog of JOptionPane.
iii) Enter values for each data member of the 'Ingredient' object contained in 'Recipe'
iv) Enter values for each variable of the 'Vegetable' object contained in 'Recipe'
v) Display the values using the message dialog of JOptionPane.