File handling operation, JAVA Programming

Write a program called Drivers that displays information about Formula 1 drivers and their teams.  
 
The program starts by prompting (asking) the user for the name of an input text file. This file is guaranteed to be correct and has the following format
 
11
Paul di Resta
Force India-Mercedes
Great Britain
 
The above 4 lines make up what is known as a record. This means that if there is an integer, then the other 3 lines of the record are also present.
 
Explanation of the record

1335_File handling operation.png

There may be any number of records in the input text file. There are NO blank lines between records and no blank line at the end of the file.

The program presents the user with a menu, as follows:
 
F1 Info Menu

1. Display all information

2. Display from country

3. Display from team

4. Display from number

5. Exit

Enter choice >>

  • If the user picks menu choice 1, the entire contents of the file are displayed to the screen.
  • If the user picks menu choice 2, the program prompts (asks) the user for the name of a country. All the drivers in the input text file that match the user input country name have all their information displayed to the screen. 

This search must be case insensitive. That is, upper case and lower case letters should match.

  • If the user picks menu choice 3, the program prompts (asks) the user for the name of a team. All the drivers in the input text file that match the user input team name have all their information displayed to the screen.

This search must be case insensitive. That is, upper case and lower case letters should match.

  • If the user picks menu choice 4, the program prompts (asks) the user for a race number. The driver in the input text file whose race number matches the user input has all their information displayed to the screen.
  • If the user picks menu choice 5, the program exits.
  • Any other menu choice should be displayed as an error, with an appropriate message to the user and the menu is re-displayed. Shown below is a sample run of the program (user input is in bold):(Most of the drivers are not shown for menu choice 1 to save space, your program will show the entire contents of any valid input text file.)
Posted Date: 2/16/2013 5:44:04 AM | Location : United States







Related Discussions:- File handling operation, Assignment Help, Ask Question on File handling operation, Get Answer, Expert's Help, File handling operation Discussions

Write discussion on File handling operation
Your posts are moderated
Related Questions
Describe Remote Objects A Remote Object is one whose functions can be called from another JVM. A remote object class must execute the Remote interface. A RMI Server is an appl

Video course on computer security needed Project Description: We want a video course on computer security. Just like the way lynda provides. Skills required are Computer S

Explain the for loop in java? // This is the Hello program in Java class Hello { public static void main (String args[]) { System.out.print("Hello "); // Say Hello

Objectives: socket programming in Java: TCP Exercises: Goal: In this project we will develop a Web server in two steps. In the end, you will have built a multi-threaded Web ser

Ask question ##title.. ????? ?????#title.. ????? ?????#title.. ????? ?????Minimum 100 words accepted#

SMTP (Simple Mail Transfer Protocol) permits two mail servers to communicate using a easy language, and gives a step-by-step protocol for exchanging information. SMTP delivers m

Question 1: a) What is the meaning of an object-oriented programming? b) List eight simple types of data in Java c) Explain how objects and classes are closely related.

Mike sells on the average 15 newspapers per week (Monday – Friday). Find the probability that 2.1 In a given week he will sell all the newspapers [7] 2.2 In a given day he will se

Explain the Reading documentation for a class in the class library For instance, let's suppose you need to use the URL class in the java.net package. Through reading the docume

I need some Unique Idea About my final Year Project . It could be a Website or an Android application. I want to create Something very unique which in some sense benefits a society