Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This is a java coding problem. Topics This assignment will give you practice with classes, inheritance, ArrayLists, and thinking/designing code with an Object-Oriented approach Instructions

This is a java coding problem. image text in transcribedimage text in transcribedimage text in transcribedimage text in transcribedimage text in transcribed

Topics This assignment will give you practice with classes, inheritance, ArrayLists, and thinking/designing code with an Object-Oriented approach Instructions You are going to write a program that will simulate the very beginnings of a Ticketing System for an entertainment venue (think Key Arena, Tacoma Dome, Quest Field, etc). You will design a Ticket class and a VIPTicket . You will then write a main client program that will create a set number of Tickets and print out an ascii art version of the tickets. In theory, we could continue to build on this program to create a more complicated system that allows people to purchase tickets (become owners of tickets), calculate sales, and much more like TicketMaster or StubHub Ticket class You need to write a Ticket class, where: A ticket has the following instance fields: seat number, cost, and owner. . The Ticket class should also share a class variable(Hint: use private static int nextSeat-1;) with all Tickets for the next available seat (this changes every time a ticket is issued) A Ticket should be able to be created given no information o Two constructors should be created: one with no parameters (default or zero-parameter constructor) and one that takes a single string (owner name) and a double cost(ticket cost). You can assign the seatNumber using the class variable nextSeat. Tickets should be created starting with seat #1, and every subsequent ticket should be one seat higher. o Tickets should cost $50 by default. o You determine what the starting value of the owner field is for the constructor with no params (make it logical) A Ticket should have accessors(getters) for all instance fields: seat number, owner, and cost. A Ticket should have mutators (setters) for the owner and the cost A Ticket should have a getType method which returns a String that returns "General Admission" as the ticket type

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

Databases In Networked Information Systems 6th International Workshop Dnis 2010 Aizu Wakamatsu Japan March 2010 Proceedings Lncs 5999

Authors: Shinji Kikuchi ,Shelly Sachdeva ,Subhash Bhalla

2010th Edition

3642120377, 978-3642120374

More Books

Students also viewed these Databases questions