Question: Instructions: Begin by creating a new Java project in Eclipse, named according to the lab guidelines - project name should be abc 1 2 3
Instructions:
Begin by creating a new Java project in Eclipse, named according to the lab guidelines project name should be abclab where abc is your UTSA ID
Create the following new Java classes, in the default package:
ComedyClubMember.java
RegularMember.java
VIPMember.java
ComedyClub.java
Place Labjava Download LabjavaOpen this document with ReadSpeaker docReaderclass in the default package within your project. Labjava has a main method and will be the class to run our application. Follow the remaining instructions for each class in this lab in order to get your code to compile do not change the given class. Note that this code will not compile until you have completed the requirements of this lab. There will be syntax errors until all dependencies classes and methods are implemented. Once your code compiles, you will be able to examine the output of your program. The output of your program must match the format of the sample below. This sample is the result of running the Labjava class with the given main method.
The Average Laughter Intensity in UTSA Club:
Comedy Club Name: Alamo Number of Current Members: Club Members:
Regular Club Member name: Sara Mate, laughterIntensity: Phone Number: Not provided, Membership End Date: Discount Coupouns: true
VIP Club Member name: Dan Gutman, laughterIntensity: Phone Number: Free Drinks: Guest Passes:
VIP Club Member name: Norman Fin, laughterIntensity: Phone Number: Free Drinks: Guest Passes:
More Details:
ComedyClubMember.java
This class will represent a comedy club member, which we will define as having:
name String: the name of the club member eg Michael Scott
membershipType String: the type of membership eg Regular, VIP
laughterIntensity int: a measure of how intensely the member laughs during performances
phoneNumber String: the phone number of the member eg
A constructor that initializes all variables
Getters and setters for all variables
A toString method which returns a String representation of a comedy club member
This class will be abstract and the RegularMember and VIPMember classes will extend it
RegularMember.java
This class will represent a regular member, which will be a type of ComedyClubMember and we will define as having:
membershipEndDate String: the date when the membership ends eg
hasDiscountCoupoun boolean: an indicator to whether the member has discount coupons
A constructor that initializes all instance variables, and any other constructors as needed
Getters and setters for all variables
A toString method which returns a String representation of a regular member
VIPMember.java
This class will represent a VIPMember object, which will be a type of ComedyClubMember and we will define as having:
numFreeDrinks int: the number of free drinks the member has
numGuestPasses int the number of free guest passes the member has
A constructor that initializes all instance variables, and any other constructors as needed
Getters and setters for all variables
A toString method which returns a String representation of a VIP member
ComedyClub.java
This class will represent a ComedyClub, defined as having:
A name for the club represented as a String eg UTSA
An array of ComedyClubMember objects
A constructor that initializes the club name and the club members array
A constructor that initializes the club name and populates the club members array, and any other constructors as needed
An addMemeber method which takes in a single ComedyClubMember object, adds it to that club, and doesnt return anything. All clubs can contain at most members. Once full, no additional contacts can be added.
A removeMemeber method which takes in a single ComedyClubMember object and removes it from the club.
Getters and setters for all variables
A toString method which returns a String representation of a club
Note: This lab is meant to review regular arrays in Java, no other data structure may be used to store the objects required. No ArrayLists are permitted, for example
Submitting Your Lab:
When you have finished programming, create a zip file of the project and submit it on Canvas
rightclick on your project in Eclipse
Click "Export"
Under "General" choose "Archive File"
Ensure your project name is selected in the top left listing of projects only the project you need to submit Ensure all required files are included.
Under To archive file", select a place to save your file and name your zip file for labs, follow the abclabX.zip convention
Upload only the zip file to Canvas here
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
