Computer Science > QUESTIONS & ANSWERS > Computer Science Engineering & Technology Java Programming Travel Agency Parveen agency, a regist (All)

Computer Science Engineering & Technology Java Programming Travel Agency Parveen agency, a registered IRCTC agent can book any number of e-Tickets. For Sleeper(SL) and Chair(2S), he earns a commission of...

Document Content and Description Below

Question Answered step-by-step Travel Agency Parveen agency, a registered IRCTC agent can book any number of e-Tickets. For Sleeper(SL) and Chair(2S), he earns a commission of Rs.60/passenger... whereas, for First class AC(1A), Second class AC(2A) and Third class AC(3A) he earns Rs.100/passenger. The owner of Parveen agency decides to automate to calculate the commission he earned so far. Help him to calculate using Lambda expressions. Requirement 1: Calculate the Commission amount The owner wants to calculate the commission amount based on the class type. Component Specification: Ticket(POJO class) Type(class) Attributes Methods Ticket long pnrNo String passengerName int seatNo String classType double ticketFare Include the Getters and Setters. Also write 5 argument constructor in the order : pnrNo, passengerName, seatNo, classType , ticketFare Component Specification: CommisionInfo Interface - This is a Functional Interface. Type(Interface) Methods Responsibilities CommisionInfo public double calculateCommissionAmount(Ticket ticketObj) This method is an abstract method used to calculate the amount he earns as his commission based on the class type using ticketObj. Component Specification: UserInterfaceClass Component Name Type(Class) Methods Responsibilities Generate the commission obtained UserInterface public static CommissionInfo generateCommissionObtained () This method should return a CommisionInfo object. To this, implement the lambda expression to calculate the commission charges obtained per person based on the class type of the passenger. The UserInterface class contains the main method. In the main method, Get the passengers count and based on the count get the ticket details like: pnrNo, passengerName, seatNo, classType, ticketFare of each passenger. Create the Ticket object as an array. Invoke the static method generateCommissionObtained(). It returns a CommissionInfo object. Capture the CommissionInfo object in a reference variable. Using the reference of CommissionInfo, invoke the calculateCommissionAmount by passing the Ticket object as a parameter and capture the commission amount which is returned. The output should be displayed as shown in the sample output. Note: In the Sample Input / Output provided, the highlighted text in bold corresponds to the input given by the user and the rest of the text represents the output. Ensure to follow the object oriented specifications provided in the question. Ensure to provide the name for classes, interfaces and methods as specified in the question. Adhere to the code template, if provided. Display the service charge correct to 2 decimal places. Use the System.out.printf method. Sample Input 1: Enter the no of passengers 5 Details of Passenger 1: Enter the pnr no: 4617813567 Enter passenger name: Arun Enter seat no: 34 Enter class type: 1A Enter ticket fare: 240 Details of Passenger 2: Enter the pnr no: 4617813567 Enter passenger name: Aruna Enter seat no: 36 Enter class type: 2A Enter ticket fare: 200 Details of Passenger 3: Enter the pnr no: 4617813590 Enter passenger name: Rachel Enter seat no: 23 Enter class type: 2S Enter ticket fare: 150 Details of Passenger 4: Enter the pnr no: 4617813570 Enter passenger name: Helen Enter seat no: 48 Enter class type: 1A Enter ticket fare: 240 Details of Passenger 5: Enter the pnr no: 4617813567 Enter passenger name: Andrews Enter seat no: 78 Enter class type: 3A Enter ticket fare: 240 Sample Output 1: Commission Obtained Commission obtained per each person: Rs.460.00 [Show More]

Last updated: 1 year ago

Preview 1 out of 7 pages

Reviews( 0 )

Recommended For You

 Engineering> QUESTIONS & ANSWERS > Questions and Answers > Engineering & Technology Computer Science Zenith Healthcare is a new company in the market and has launched its product two years ago... (All)

preview
Questions and Answers > Engineering & Technology Computer Science Zenith Healthcare is a new company in the market and has launched its product two years ago...

Question Zenith Healthcare is a new company in the market and has launched its product two years ago. The product is loved by clients and is growing in popularity. The level of product demand was n...

By Kirsch , Uploaded: Oct 19, 2021

$13

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Java Programming Six-part drawing. The wall is divided horizontally and vertically into six equal parts. 1st part: (All)

preview
Computer Science Engineering & Technology Java Programming Six-part drawing. The wall is divided horizontally and vertically into six equal parts. 1st part:

Question Please I need help recreating the works of Sol LeWitt using p5js as per the below instructions. a. Six-part drawing. The wall is divided horizontally and vertically into six equal part...

By Kirsch , Uploaded: Oct 16, 2021

$14

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Networking Explain the difference between a stateless and a stateful firewall. Can a firewall be used to block all incoming email containing the phrase 'You are... (All)

preview
Computer Science Engineering & Technology Networking Explain the difference between a stateless and a stateful firewall. Can a firewall be used to block all incoming email containing the phrase 'You are...

Question Answered step-by-step Explain the difference between a stateless and a stateful firewall.... Explain the difference between a stateless and a stateful firewall. Can a firewall be...

By Cheryshev , Uploaded: Jul 19, 2021

$9

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology MYSQL Three tables contain a reference column with the same datatype Which SQL statement selects a specific column from each of three tables? O SELECT i... (All)

preview
Computer Science Engineering & Technology MYSQL Three tables contain a reference column with the same datatype Which SQL statement selects a specific column from each of three tables? O SELECT i...

Question Answered step-by-step Three tables contain a reference column with the same datatype... 93084250-1056562.jpeg Image transcription text Three tables contain a reference column with the...

By Muchiri , Uploaded: Jul 11, 2021

$8

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Networking Problem Statement : Use cisco packet software to solve this The world of communications is moving faster and faster. The continuous growth of network... (All)

preview
Computer Science Engineering & Technology Networking Problem Statement : Use cisco packet software to solve this The world of communications is moving faster and faster. The continuous growth of network...

Question Answered step-by-step Problem Statement : Use cisco packet software to solve this The... Problem Statement: Use cisco packet software to solve this The world of communications is mov...

By Cheryshev , Uploaded: Jul 06, 2021

$8

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Python Programming Design a function that accepts a rectangle's width and length as arguments and returns the rectangle's area. Use the function in a program that... (All)

preview
Computer Science Engineering & Technology Python Programming Design a function that accepts a rectangle's width and length as arguments and returns the rectangle's area. Use the function in a program that...

Question Answered step-by-step Design a function that accepts a rectangle's width and length as... Design a function that accepts a rectangle's width and length as arguments and returns the rectang...

By Cheryshev , Uploaded: Jul 02, 2021

$8

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Java Programming Salary Calcualtor 0 X Basic Salary 40000 Bonus 3000 Total Salary 43000.0 Tax@6% 2580.0 Net Salary 40420.0 Annual Net Salary 485040. (All)

preview
Computer Science Engineering & Technology Java Programming Salary Calcualtor 0 X Basic Salary 40000 Bonus 3000 Total Salary 43000.0 Tax@6% 2580.0 Net Salary 40420.0 Annual Net Salary 485040.

Question Answered Q.No.1 Do as directed (Marks 10) Write a java application that saves data by taking input Student...

By Cheryshev , Uploaded: Jun 24, 2021

$11

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Java Programming Six-part drawing. The wall is divided horizontally and vertically into six equal parts. 1st part: On red, blue horizontal parallel lines, and in the... (All)

preview
Computer Science Engineering & Technology Java Programming Six-part drawing. The wall is divided horizontally and vertically into six equal parts. 1st part: On red, blue horizontal parallel lines, and in the...

Question Please I need help recreating the works of Sol LeWitt using p5js as per the below instructions. a. Six-part drawing. The wall is divided horizontally and vertically into six equal pa...

By Cheryshev , Uploaded: Jun 12, 2021

$11

 Software Engineering> QUESTIONS & ANSWERS > Computer Science Engineering & Technology Software engineering What is the difference between the Known Risks and Predictable Risks ? Share Question (All)

preview
Computer Science Engineering & Technology Software engineering What is the difference between the Known Risks and Predictable Risks ? Share Question

Question What is the difference between the "Known Risks" and Predictable Risks" ?

By d.occ , Uploaded: May 28, 2021

$5

 Computer Science> QUESTIONS & ANSWERS > Computer Science Engineering & Technology MYSQL Explain why all keys are superkeys but not all superkeys are keys. Define the terms key and superkey. Share Question (All)

preview
Computer Science Engineering & Technology MYSQL Explain why all keys are superkeys but not all superkeys are keys. Define the terms key and superkey. Share Question

Question Explain why all keys are superkeys but not all superkeys are keys. Define the terms key and superkey.

By d.occ , Uploaded: May 09, 2021

$5

$11.00

Add to cart

Instant download

Can't find what you want? Try our AI powered Search

OR

GET ASSIGNMENT HELP
862
0

Document information


Connected school, study & course



About the document


Uploaded On

Jun 24, 2021

Number of pages

7

Written in

Seller


seller-icon
Cheryshev

Member since 2 years

102 Documents Sold


Additional information

This document has been written for:

Uploaded

Jun 24, 2021

Downloads

 0

Views

 862

Document Keyword Tags

THE BEST STUDY GUIDES

Avoid resits and achieve higher grades with the best study guides, textbook notes, and class notes written by your fellow students

custom preview

Avoid examination resits

Your fellow students know the appropriate material to use to deliver high quality content. With this great service and assistance from fellow students, you can become well prepared and avoid having to resits exams.

custom preview

Get the best grades

Your fellow student knows the best materials to research on and use. This guarantee you the best grades in your examination. Your fellow students use high quality materials, textbooks and notes to ensure high quality

custom preview

Earn from your notes

Get paid by selling your notes and study materials to other students. Earn alot of cash and help other students in study by providing them with appropriate and high quality study materials.


$11.00

WHAT STUDENTS SAY ABOUT US


What is Browsegrades

In Browsegrades, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Browsegrades · High quality services·