Caterer Company

Ads

 
 

Share on Google+Share on Google+

Ashish
Caterer Company
3 Answer(s)      7 years 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.
Ads
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

Ads









Related Tutorials/Questions & Answers:
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
Advertisements
Mobile App Development Company
Mobile App Development Company  Hi, Which is most reliable Mobile App Development Company? Thanks
run project on company lan
run project on company lan  sir, i have create dynamic java project of complaint registration and run on local host http://localhost:8080 and by using ip adress but the problem is how to run it at on company server so
Android app development company
app development company in India? Thanks   Hi, Rose India is into development of Android and iOS mobile applications in India. Company develops... development company in India - iOS, Android and Cross platform application development
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
Write a GUI application for the WebBuy Company
Write a GUI application for the WebBuy Company   Write a GUI application for the WebBuy Company that allows a user to compose the three parts of a complete email message: the ΓΆβ?¬Ε?To:ΓΆβ?¬Β?, ΓΆβ?¬Ε?Subject:ΓΆβ?¬Β? and ΓΆβ?¬Ε
Mobile fitness application development company
Mobile fitness application development company  Hi, I am searching for mobile fitness application development company from India. I need high impact... development needs at: Mobile app development company in India Mobile
Which is the best company for mobile app development?
Which is the best company for mobile app development?  Hi, Trying for find a best company in India for developing application for my company... have good look and feel. Which is the best company for mobile app development
Faast Company in Hyderabad(Access Infotech) - Ajax
Faast Company in Hyderabad(Access Infotech)  Access infotech Best growing company in IT industry in hyderabad Best place to work beginning IT careers
Faast Company in Hyderabad(Access Infotech) - Ajax
Faast Company in Hyderabad(Access Infotech)  Access infotech Best growing company in IT industry in hyderabad Best place to work beginning IT careers
What is the responsibility of project manager in software company
What is the responsibility of project manager in software company  What is the responsibility of project manager in software company
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
How to register domain name for my Company?
How to register domain name for my Company?  Hi, Where and How to register domain name for my Company? Thanks   Many website such as godaddy.com and other provides the domain registration services. You can register
Which is the best IT company for app development in India?
Which is the best IT company for app development in India?  Hi, I have several mobile application development and looking for IT Company for App development in India? Which is the best IT company for app development in India
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
Where can I find reviews of IT solutions company in India to choose from?
Where can I find reviews of IT solutions company in India to choose from?  Where can I find reviews of IT solutions company in India to choose from
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
why should we install the ADempiere in company - Development process
why should we install the ADempiere in company  why we sholuld install the adempiere erp in company
Mobile app development company in India
Mobile app development company in India - iOS, Android and Cross platform application development Rose India Technologies Pvt. Ltd. is into the development of iOS, Android and cross platform applications for our esteem clients. We
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
Find Suitable Service Provider, How to Find a Suitable Company for Outsourcing
How to find a suitable outsourcing vendor Introduction:  Finding the right kind of outsourcing vendor is very critical to the success of the company that is outsourcing. The outsourcer should have a clear mind as to what
Web Designing India,Web Designing Company,Delhi Web Designing Company,Web Designing Outsourcing India
The corporate website is an informative website that is operated by a business company... task, it takes lots of times and energy in hunting a deserving company. The team... requirements and your goal exactly. Website Designing Company India Roseindia
Outsourcing Company India,Offshore Outsourcing Services,IT Outsourcing Company in India,Offshore Outsourcing Service
Outsourcing Services - Outsourcing Company in India Rose India Technologies Pvt. Ltd. is Outsourcing Company in India, with experience... to the business. We are premier IT Outsourcing Company in India, which