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 about Applet Security? The possibility of surfing the Net, wandering across a random page, playing an applet and catching a virus is a fear in which has scared several

How many static initializers can you have ? As many as you want, but the static initializers and class variable initializers are implemented in textual order and may not refer

Write a program that manages a list of train tickets, JAVA Programming

1. Which of the following are not valid Java identifiers, and why? (a) wolVes (b) United(there is only one) (c) 87 (d) 5 3 (e) Real ale (f) isFound?by 2. A class Television

Im not in the line of computer science.But i would like to have some knowledge about the computer language "JAVA".I aldredy learns the computer languages "C,C++".So kindly help me

Each time an object is started in Java it goes into the area of memory named as heap. The primitive variables like double and int are allocated in the stack, if they are local inst

Dynamic JAVA Class and type information is kept around at runtime. This allows runtime loading and inspection of code in a very flexible way.

Need Simple Desktop Software I am seeking a software that can do the subsequent: 1. Check position for a URL in Google, Yahoo, Bing. 2. Check position for a YouTube video

Class variables are named as static variables. There is only single occurrence of a class variable per JVM per class loader. When a class is operated the class variables are in

(Package Inheritance Hierarchy) Package-delivery services, such as FedEx®, DHL® and UPS®, offer a number of different shipping options, each with specific costs associated. Create