Pages

Monday, 27 March 2017

Core Java Assignment 15

Core Java Assignment 15


A10.1-R4: INTRODUCTION TO OBJECT ORIENTED PROGRAMMING THROUGH JAVA.

Assignment 15


The Indian Airlines has launched a fast transportation service, using their supersonic passenger airplanes. You are hired by the Indian Airlines for maintaining their database. It contains only a single table, called Route, which holds all pairs of cities with a directed connection, the distance between them, and the type of aircraft used for that trip. An example table is given below:


Your program should assume that the table already exists in the database and contains data. The structure of the command line to run your program is as follows:

               Java IA Supersonic < queryType > < queryVariable > [toTable]

Your program should ask the user for login and password, and connect right after to
the database, based on the given information.

< queryType > is one of the following:
a) toCity:output all services that go to the city specified in <queryVariable >
b) fromCity:output all services that go from the city specified in <queryVariable
>
c) airplane: output all services that use airplane specified in <queryVariable > [toTable] is an optional parameter – the user may dump the query result to toTable by stating ‘toTable’ as an argument, or not specify a 3rd argument at all. In the latter case, the output should be inserted to a table called IA Result. In case that it does not exist, IA Result should be created by the program, with the same columns as Route. Otherwise, the existing data should be deleted, and the query result should
be inserted.

                                                                   Next Assignment

No comments:

Post a Comment