Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PROBLEM UPDATE DETAIL OF TRAVEL CLASSES Update details of Travel Classes Write a java program to update the details of Travel class available in the

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

image text in transcribed

PROBLEM UPDATE DETAIL OF TRAVEL CLASSES Update details of Travel Classes Write a java program to update the details of Travel class available in the database and display the list of travel class details in the descending order of names using JDBC drivers. [Note: Strictly adhere to the object-oriented specifications given as a part of the problem statement. Follow the naming conventions as mentioned. Create separate classes in separate files.] Create a class TravelClass with the following attributes. Data Type Variable Name String name String description Include appropirate getters, setters, default and parameterized constructors for the above class allrivules. Data Type Variable Name String name String description Include appropirate getters, setters, default and parameterized constructors for the above class Create a class TravelClassDAO with a follqwing method Method name void display TravelClassess() Description This method ret database in the displays the san This method up given travel clas void updateDetail(String name, String description) Create a class DBConnection with following method. Method name Description This method is used to connect the java application with oracle database. Here register the JDBC driver for public static the application, configure Connection the database getConnection() properties(fetch from oracle.properties) and return the connection object. Create a class Main with main method and call a the methods of TravelClassDAO to update and display the list as shown. Create a class Main with main method and call the methods of TravelClass DAO to update and display the list as shown. Use the below format to print the details in table: System.out.format("%-25s %s ","Name","Description"); N oracle.properties : db.url = jdbc.oracle:thin:@localhost:1521:xe db.username = root db.password = student Use the below code to retrieve the connection details from oracle.properties to establish connection ResourceBundle rb = ResourceBundle.getBundle("oracle"); String url = rb.getString("db.url"); String user = rb.getString("db.username"); String pass = rb.getString("db.password"); = Create a class Main with main method and call the methods of TravelClassDAO to update and display the list as shown. Use the below format to print the details in table: System.out.format("%-25s %s ","Name","Description"); a oracle.properties : db.url = jdbcoracle:thin:@localhost:1521:xe db.username = root db.password = student Use the below code to retrieve the connection details from oracle.properties to establish connection ResourceBundle rb = ResourceBundle.getBundle("oracle"); String url = rb.getString("db.url"); String user = rb.getString("db.username"); = String pass = rb.getString("db.password"); Use the below code to retrieve the connection details from oracle.properties to establish connection ResourceBundle rb = ResourceBundle.getBundle("oracle"); String url = rb.getString("db.url"); String user = rb.getString("db.username"); String pass = rb.getString("db.password"); Table Properties: create table travel_class id number(10) not null, name VARCHAR2(45) not null, description CLOB not null, primary key(id) ): Sample Input and Output: w Enter the name of TravelClass : Economy Class Enter the description to update : Lowest travel class of seating in flight travel. Updated List of Travel Classes Name Description Premium Economy Class Positioning in price, comfort, and amenities, this travel class is leveled between economy class and business class. Economy Class Lowest travel class of seating in flight travel. Business Class Intermediate level of service between economy class and first class. M

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Fundamentals Of Database Systems

Authors: Ramez Elmasri, Sham Navathe

4th Edition

0321122267, 978-0321122261

Students also viewed these Databases questions

Question

Types of Interpersonal Relationships?

Answered: 1 week ago

Question

Self-Disclosure and Interpersonal Relationships?

Answered: 1 week ago