java programming ;
Consider the scenario given below and define necessary classes along with its behavior. "A Hotel offers both restaurant and residential services. The restaurant offers foods both for walk-in and residential customers. It also provides home delivery for outsiders. Every service is designated with al service-man. Number of services each day indicates the performance of a service-man. Residential service consists room accommodation, swimming pool and gymnasium. A residential customer can avail Deluxe room/ King room for maximum 2 persons. Presidential room/ Cottage up holds up to 6 persons. Maximum 2 children of age below 12 years are out of charge, whereas more than 2 children have to pay for the services. Additional sleeping bed can be added with additional charges. Swimming pool and gymnasium are associated with every room and can be used once every day."
Answers
Answered by
1
Easy.
create an object from the ArrayList class named integers
ArrayList<Integer> integers = new ArrayList<>();
// let's add the values 15, 34, 65, 111 to the integers object
integers.add(15);
integers.add(34);
integers.add(65);
integers.add(111);
// we print the size of the integers object
System.out.println(integers.size());
Similar questions