Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

QUESTION 6 5. Write a Java program using Scanner class to print an airline ticket for a travel from Starting city to destination city in

image text in transcribed
QUESTION 6 5. Write a Java program using Scanner class to print an airline ticket for a travel from Starting city to destination city in an airline. Create a class called airline. Create variables for the following fields given below. Get the input from user using Scanner class for the fields given below - Airlines name use a String variable for this field - City headquarters of the airlines - use a String variable for this field Starting city for this travel - use a String variable for this field - Destination city - use a String variable for this field - Travel class for this journey (First /Economy/ Business)- use a String/character variable for this field - Ticket cost: Based on the travel class input by the user, assign the value to this variable Display the airline ticket as output with the variables used in this program along with their corresponding values. For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac). B IVParagraph Arial 14px I !!! OWE

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

SQL Instant Reference

Authors: Gruber, Martin Gruber

2nd Edition

0782125395, 9780782125399

Students also viewed these Databases questions