Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

i want a UML class digram with explanation the class code java: import java.util.ArrayList; import java.util.Arrays; public class TicketType { //fields private ArrayList ScreenTypes; private

i want a UML class digram with explanation

the class code java:

import java.util.ArrayList; import java.util.Arrays;

public class TicketType { //fields private ArrayList ScreenTypes; private String[] Seats; private ArrayList TicketPrice; /** * constructor */ public TicketType () { } /** * constructor that takes arguments * @param sn * @param st * @param p */ public TicketType (ArrayList sn, String[] st,ArrayList p) { ScreenTypes = sn; Seats = st; TicketPrice = p; } /** * copy constructor to copy the object to the new object * @param Object2 */ public TicketType (TicketType Object2) { ScreenTypes = Object2.ScreenTypes; Seats = Object2.Seats; TicketPrice = Object2.TicketPrice; }

/** * method return the screen types * @return ScreenTypes */ public ArrayList getScreenTypes() { return ScreenTypes; }

/** * method that set screen types * @param sn */ public void setScreenTypes(ArrayList sn) { ScreenTypes = sn; }

/** * method return the seats * @return seats */ public String[] getSeats() { return Seats; } /** * method that set the seats * @param st */ public void setSeats(String[] st) { Seats = st; }

/** * method return the Ticket price * @return TicketPrice */ public ArrayList getTicketPrice() { return TicketPrice; } /** * method that set ticket price * @param p */ public void setTicketPrice(ArrayList p) { TicketPrice = p; } /** * toString method to print details */ @Override public String toString() { String str = ScreenTypes +" " + " ---------------Movie Seats--------------- " + "_____________________________________________ " +" Screen " + "_____________________________________________ " + Arrays.toString(Seats) + " "+ "---------------Ticket price--------------- "+TicketPrice; return str; } }

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

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions