SlideShare a Scribd company logo
Hi could I get the java code for all the tasks pls, many thanks!! Task 9) Create a new class file
called Person (Person.java) with a constructor and the following attributes: name, surname, and
email. Add a constructor that takes the 3 variables as input to create an object Person. Task 10)
Create a new class file called Ticket (Ticket.java) with a constructor and the following attributes:
row, seat, price, and Person. Person will be is an object created using the class Person from Task
9. Task 11) Add a method in class Ticket called print that prints all the information from a ticket:
Person name, Person surname, Person email, row, seat, and price. Task 12) In the main program,
add an array list of tickets to save all the Tickets. Extend the buy_ticket method such that when
buying a ticket, it asks for the information of a Person, creates a new ticket and adds the ticket in
the new array list of tickets. Extend the cancel_ticket method such that when cancelling a ticket,
it removes the ticket from the array list of tickets. Task 13) Create a method called
show_tickets_info that prints all the information for all tickets and calculates and shows the total
price of all tickets after the ticket's info. Example, if ticket 1 costs 20 and ticket 2 costs 10, the
total price will be 30. Call this method when the user selects ' 7 ' in the main menu. Task 14)
Create a method called sort_tickets that returns a new list of Tickets sorted by Ticket price in
ascending order (cheapest first). Print the tickets information once have been sorted (including
price). Call this method when the user selects ' 8 ' in the main menu.

More Related Content

DOCX
Amusement Park Programming ProjectProject Outcomes1. Use the Jav.docx
DOCX
© 2014 Laureate Education, Inc. Page 1 of 4 Retail Trans.docx
DOCX
Objectives The main objective of this assignment is checking .docx
DOCX
Objectives The main objective of this assignment is checking .docx
DOCX
Railway reservation(c++ project)
DOCX
Railway reservation(c++ project)
DOCX
I received answers to 2 App requests and paid. The JAVA Apps are not.docx
DOCX
1- GivenaclassnamedTicketDB- whichwillbeusedtoprovidetheresponsibility.docx
Amusement Park Programming ProjectProject Outcomes1. Use the Jav.docx
© 2014 Laureate Education, Inc. Page 1 of 4 Retail Trans.docx
Objectives The main objective of this assignment is checking .docx
Objectives The main objective of this assignment is checking .docx
Railway reservation(c++ project)
Railway reservation(c++ project)
I received answers to 2 App requests and paid. The JAVA Apps are not.docx
1- GivenaclassnamedTicketDB- whichwillbeusedtoprovidetheresponsibility.docx

Similar to Hi could I get the java code for all the tasks pls, many thanks!.pdf (16)

PDF
OOP Assignment 03.pdf
PDF
The_Ultimate_Java_CheatSheet.pdfjkrwogjw
PDF
coe808 proj repot
PDF
BELOW IS MY CODE FOR THIS ASSIGMENT BUT IT NOT WORKING WELL PLEASE H.pdf
DOCX
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docx
DOCX
Resources the Final Project Overview and the Final Project Interv.docx
PDF
Submit the -java source files for the following tasks- Task 1- Studen.pdf
DOCX
Java practical
DOCX
JAVA practical Exam Questions (1).docx
PDF
Effective java
DOCX
simple-movie-ticket-booking-system-1
DOCX
Explain the concept of two types of network intrusions What devic.docx
PPTX
Advanced-java.pptx
PDF
Basic program in java
KEY
Ej Chpt#4 Final
DOC
Java programming lab assignments
OOP Assignment 03.pdf
The_Ultimate_Java_CheatSheet.pdfjkrwogjw
coe808 proj repot
BELOW IS MY CODE FOR THIS ASSIGMENT BUT IT NOT WORKING WELL PLEASE H.pdf
COIT20245, 2016 Term One - Page 1 of 9 Assessment detail.docx
Resources the Final Project Overview and the Final Project Interv.docx
Submit the -java source files for the following tasks- Task 1- Studen.pdf
Java practical
JAVA practical Exam Questions (1).docx
Effective java
simple-movie-ticket-booking-system-1
Explain the concept of two types of network intrusions What devic.docx
Advanced-java.pptx
Basic program in java
Ej Chpt#4 Final
Java programming lab assignments
Ad

More from aggarwalshoppe14 (20)

PDF
I am sure you have heard the adage �my word is my bond�. We do not k.pdf
PDF
I really need some help if I have this right so far. Please Resub.pdf
PDF
I receive this answer for one of my questions, I need the reference .pdf
PDF
I really need some help if I have this right so far. PLEASE CHANG.pdf
PDF
I need this code, to show ALL inventory items, then with the remove .pdf
PDF
I need help with the last 2 methods only in Huffman.java file the me.pdf
PDF
I need help creating this flutter applicationPlease provide a com.pdf
PDF
His Majesty�s Government report that 20 of officials arrive late fo.pdf
PDF
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
PDF
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
PDF
Hi, I need help with this Probability question. Please show work and.pdf
PDF
HHI analysis indicates that many states have a highly concentrated i.pdf
PDF
Hello I need help configuring the regression equation for this scatt.pdf
PDF
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
PDF
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
PDF
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
PDF
Here are the instructions and then the code in a sec. Please R.pdf
PDF
help write program Project Desoription The purpose of thi project i.pdf
PDF
I need a case analysis using Harvards Business School format please.pdf
PDF
Household size and educational status are part of ���� Psychologic.pdf
I am sure you have heard the adage �my word is my bond�. We do not k.pdf
I really need some help if I have this right so far. Please Resub.pdf
I receive this answer for one of my questions, I need the reference .pdf
I really need some help if I have this right so far. PLEASE CHANG.pdf
I need this code, to show ALL inventory items, then with the remove .pdf
I need help with the last 2 methods only in Huffman.java file the me.pdf
I need help creating this flutter applicationPlease provide a com.pdf
His Majesty�s Government report that 20 of officials arrive late fo.pdf
HIVin RNA genomu, bir RNA ablonundan bir DNA genomunu sentezlemek i.pdf
Hile ��geni bileenlerini a�klar. Tannm bir kriminolog olan Donald .pdf
Hi, I need help with this Probability question. Please show work and.pdf
HHI analysis indicates that many states have a highly concentrated i.pdf
Hello I need help configuring the regression equation for this scatt.pdf
Health Economics with Taxation and Agrarian ReformActivity 2 Grap.pdf
Here is app.js, artist.js and songs.js file. Can you look at the my .pdf
Here is a short amino acid sequence mapped as polar (P) and nonpolar.pdf
Here are the instructions and then the code in a sec. Please R.pdf
help write program Project Desoription The purpose of thi project i.pdf
I need a case analysis using Harvards Business School format please.pdf
Household size and educational status are part of ���� Psychologic.pdf
Ad

Recently uploaded (20)

PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
PDF
Basic Mud Logging Guide for educational purpose
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Pre independence Education in Inndia.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
STATICS OF THE RIGID BODIES Hibbelers.pdf
PPTX
master seminar digital applications in india
PPTX
Cell Structure & Organelles in detailed.
PPTX
Pharma ospi slides which help in ospi learning
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PPTX
Lesson notes of climatology university.
PPTX
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
PDF
Anesthesia in Laparoscopic Surgery in India
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PDF
Computing-Curriculum for Schools in Ghana
PDF
O7-L3 Supply Chain Operations - ICLT Program
PDF
RMMM.pdf make it easy to upload and study
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
1st Inaugural Professorial Lecture held on 19th February 2020 (Governance and...
Basic Mud Logging Guide for educational purpose
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pre independence Education in Inndia.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
STATICS OF THE RIGID BODIES Hibbelers.pdf
master seminar digital applications in india
Cell Structure & Organelles in detailed.
Pharma ospi slides which help in ospi learning
human mycosis Human fungal infections are called human mycosis..pptx
Lesson notes of climatology university.
BOWEL ELIMINATION FACTORS AFFECTING AND TYPES
Anesthesia in Laparoscopic Surgery in India
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Computing-Curriculum for Schools in Ghana
O7-L3 Supply Chain Operations - ICLT Program
RMMM.pdf make it easy to upload and study

Hi could I get the java code for all the tasks pls, many thanks!.pdf

  • 1. Hi could I get the java code for all the tasks pls, many thanks!! Task 9) Create a new class file called Person (Person.java) with a constructor and the following attributes: name, surname, and email. Add a constructor that takes the 3 variables as input to create an object Person. Task 10) Create a new class file called Ticket (Ticket.java) with a constructor and the following attributes: row, seat, price, and Person. Person will be is an object created using the class Person from Task 9. Task 11) Add a method in class Ticket called print that prints all the information from a ticket: Person name, Person surname, Person email, row, seat, and price. Task 12) In the main program, add an array list of tickets to save all the Tickets. Extend the buy_ticket method such that when buying a ticket, it asks for the information of a Person, creates a new ticket and adds the ticket in the new array list of tickets. Extend the cancel_ticket method such that when cancelling a ticket, it removes the ticket from the array list of tickets. Task 13) Create a method called show_tickets_info that prints all the information for all tickets and calculates and shows the total price of all tickets after the ticket's info. Example, if ticket 1 costs 20 and ticket 2 costs 10, the total price will be 30. Call this method when the user selects ' 7 ' in the main menu. Task 14) Create a method called sort_tickets that returns a new list of Tickets sorted by Ticket price in ascending order (cheapest first). Print the tickets information once have been sorted (including price). Call this method when the user selects ' 8 ' in the main menu.