Caterer Company 3 Answer(s) 3 years and 2 months ago
Posted in : Java Beginners
Local Caterer?s Company operates a small catering service. They ask you to write an application for them to schedule their catering events. They mostly cater special events, but they occasionally cater corporate, private and nonprofit events as well. All catered events have an event minimum rate shown below:
Event Type Event Minimum Rate Manager Corporate $500.00 Dave Private $300.00 Dave Nonprofit $150.00 Veronica Special $200.00 Veronica
Write a program for Local Caterer?s Company that contains a class that has two methods for the event minimum rate and event type. Write a test program that accepts the user?s input and checks the event type input for errors until a valid event type is entered. After a valid input type is entered, the program displays the manager?s name for that event, the type of the event chosen, and the minimum rate to be charged.
View Answers
March 23, 2010 at 10:54 AM
Hi Friend,
In the following data,you haven't mention Event type.
Event Type Event Minimum Rate Manager Corporate $500.00 Dave Private $300.00 Dave Nonprofit $150.00 Veronica Special $200.00 Veronica
Please provide the Event Type also.
Thanks
March 23, 2010 at 7:43 PM
Event types are Corporate, private, non-profit and special
March 24, 2010 at 3:42 PM
Hi Friend,
Try the following code:
import java.io.*; import java.util.*;
class Events{ public String type; public String rate; public String manager;
public Events(){} public Events(String type,String rate,String manager) { this.type = type; this.rate = rate; this.manager=manager; }
public String getType() { return type; } public String getRate() { return rate; } public String getManager() { return manager; } } public class CateringEvent { public static void main(String[] args) throws Exception { System.out.println(); System.out.println("******Catering Services******"); System.out.println(); System.out.println("*****Event Types*****"); System.out.println(); System.out.println("1 Corporate"); System.out.println("2 Private"); System.out.println("3 Nonprofit"); System.out.println("4 Special"); List<Events> list = new ArrayList<Events>(); list.add(new Events("Corporate", "$500.00","Dave")); list.add(new Events("Private", "$300.00","Dave")); list.add(new Events("Nonprofit", "$150.00","Veronica")); list.add(new Events("Special", "$200.00","Veronica")); System.out.println(" "); Scanner input=new Scanner(System.in); System.out.print("Enter Event Type: "); String eventType= input.next(); String arr[]={"Corporate","Private","Nonprofit","Special"}; while(!eventType.equals(arr[0])&&!eventType.equals(arr[1])&&!eventType.equals(arr[2])&&!eventType.equals(arr[3])){ System.out.print("Re Enter Event Type: "); eventType= input.next(); } for (Events s : list){ if(eventType.equals(s.getType())){ System.out.println("Event Type: "+s.getType()); System.out.println("Event Minimum Rate: "+s.getRate()); System.out.println("Manager: "+s.getManager()); } }
} }
Thanks
Related Pages:
Caterer Company - Java Beginners Caterer Company Local Caterer?s Company operates a small catering service.
They ask you to write an application for them to schedule... Veronica
Write a program for Local Caterer?s Company that contains a class
Best Company in Hyderbad - JDBC
Best Company in Hyderbad Access Infotech
Best for beginners Access Infotech Pvt. Ltd. Unit 5B, 4th Floor, Topaz Building, Punjagutta, Hyderabad-500082 Phone No : 040 30584310/11/12 Fax No : 040 30584315
iPhone Development Company
iPhone Development Company
Roseindia Technologies Pvt Ltd, an emerging iPhone Development Company in India is working on some groundbreaking iPhone software and web apps like Chess, Poker, Ridicules, Puzzles, Number game, Word search
logo of the music company, logo
How to design a logo of the music company
 ... their
identity. The logo which we are going to make is of the music company. You... to make a music company logo. keep on following this example
until the end
Calculate Company's Sale using Java
Calculate Company's Sales Using Java
In this section, you will learn how to calculate Company's sale. A company sales 3 items at different rates and details...:
a) The total weekly sale of the company
b) The total sale of each item at the end
need java code for <company:loc="bang">
need java code for hi i want to write code like , i used setAttribute method for this. but its showing
ERROR: 'Namespace for prefix 'company...: java.lang.RuntimeException: Namespace for prefix 'company' has not been declared.
please help
Faast Company in Hyderabad(Access Infotech) - Java Beginners
Faast Company in Hyderabad(Access Infotech) Best for beginners
Access Infotech Pvt. Ltd.
Unit 5B, 4th Floor,
Topaz Building, Punjagutta,
Hyderabad-500082
Phone No : 040 30584310/11/12
Fax No : 040 30584315
Web Page design and Development Company
Web Page design and Development Company
We are web page designing and development company in India. We offer high
impact webpage designing, development, re... complete web page design and development solution. Our company is
expert
Web design company in Delhi
Web design company in Delhi
We are professional web design and development company
in Delhi, India. Our team of professional designer and web application...;
Communications
Our company in offering Communications website templates.
 
Website Designing Company India
Website Designing Company India
Roseindia Technology Pvt Ltd is a one of the most front
running website designing company in India that offers... designing company in India.
Our designer professionals are highly talented, well
Indian Software Development Company
Rose India Technologies ? An Indian Software Development Company
RoseIndia Technologies is an Indian software development company... an
Indian software development company among all business entities who have
Software Development, Software Services Company
services company providing wide
range of software development services. We....
As a software development company, we explore the latest frameworks... quality
solutions.
Our company is providing software development and support
Social Media Marketing Company
far and wide and impact is extremely strong. The company can itself select... to boost the business of the
company at cheapest prices. Some of them prove very... for hiring a deserving company
should look some common characteristics in the hiring
1 Access Infotech Number one Company - Servlet Interview Questions
1 Access Infotech Number one Company 1 Access Infotech is Number one Company who know the feelings of cutomers
feel free ask any query
Access Infotech Pvt. Ltd.
Unit 5B,
4th Floor,
Topaz Building,
Punjagutta
RIA Development Company
RIA Development Company
Rich Internet Applications (RIAs) are traditional desktop applications with
enhanced user interface. RIAs are very much different... to provide world-class
service.
Roseindia, a Delhi based software Development Company
iPhone Game Development Company
iPhone Game Development Company
Since the evaluation of the video games, the digital games have become the
hotcake of the digital world. Digital games are ripe product of high performance
graphics, great sound & attractive
Flex development company india,Flex development
Flex Development in India
Rose India Technologies is a premier Flex Development Company specialising in development of creative, successful, innovative and cost-effective projects for all your needs using Adobe Flex. Rose India has
What is Outsourcing?
a company contracts
another company to provide particular services. These
services/ functions would be otherwise carried out
in-house, by the company’s own...
kind of work.
When a company outsources peripheral work, it is able
MyMapCards
MyMapCards
Share your business cards, present your company, your job or yourself. Zoom
into the map to find business contacts at your area. Everything is live.
Read full Description
Web Site Goals - Goal of Web Designing
for the company website?
or
What is the main goal of the company through launching it?s website?
Every company want to boost it?s business through website..., the company and the client. If it is not perfectly balanced to fulfilling the demand
Perfection
Perfection
Chase Technology is a company that develops high
quality bespoke software.
We have a range of experience in a number of business
areas, including
Fresher Job
Fresher
Job
RoseIndia is Fastest Growing IT Online Training Company Specialized in Java Technologies. We are looking for the Java persons for developing program
ADF Faces
ADF Faces
Based on a donation from the Oracle company to the Apache fondation, this is
a graphical framework based on JSF model. You will have access to basic
component or other
Corporate Web Design Services
website that is operated by a business company and provides comprehensive information... despites being informative. It gives information about the mother company, and the subsidiary as well. It also informs about the stakeholders of the company
Motivation: Important Marketing tool
for any company, which decides the final output of the company, and its strategy... a significant role for achieving the target of the company... role in maximizing the sale efficiency of a particular individual. For a company