Dear All, I brought a book to learn java progamming but unfortunately some of the answers are not in the book so I was wondering if anyone can quick help me out here and what the codes should look like. This is my firt post so pleace be nice.
/** * Chapter 3: Excercise 2 * An object of class LettingAgent maintains data and produces reports * useful in managing the business of a letting agent that arranges * the rental of homes of various kinds with between 1 and 5 bedrooms. */ import java.util.ArrayList; public class LettingAgent { /** NOTE: The following fields are essential, but NO MORE fields should be added */ private String tradingName; // Business name of the agent Ð to appear in printed reports private ArrayList<Home> available; // To hold the homes currently available for rent private ArrayList<Home> let; // To hold the homes currently let (rented out) /** Constructor to initialise a newly created LettingAgent object * The parameter supplies a business name for the agent. */ public LettingAgent(String name) { [B] /** Entre Code */[/B] } /** Method to add a home to the collection of those available to let. * -- The number of bedrooms must be in the range 1 to 5. * -- The specified address must be different from the address of any home already * in the list of homes available for letting. * If either condition is not satisfied, an error report should be printed. * If the conditions are satisfied, the home is added to those available to let, * and a fully detailed confirmation is printed. */ public void makeAvailable(String address, String kind, int bedrooms, int rent) { [B] /** Entre Code */[/B] }