Question: Create a BlueJ project that implements the Workshop class and the WorkshopSummary class described below 1. The Workshop class represents a workshop at a conference.

Create a BlueJ project that implements the Workshop class and the WorkshopSummaryclass described belowCreate a BlueJ project that implements the Workshop class and the WorkshopSummaryclassdescribed below 1. The Workshop class represents a workshop at a conference.

1. The Workshop class represents a workshop at a conference. It stores the workshop's title: title, presenter: presenter, total revenue: revenue, and seats available: seatsAvailable. Write the Workshop class according to the following requirements. o Add the four fields to the Workshop class. Create a constructor that takes two parameters. The first parameter is a String named title that is used to initialize the workshop's title (i.e. Web Services, Artificial Intelligence). The second and final parameter is a String named presenter that is used to initialize the workshop's presenter (i.e. Ariel Ortiz, Blair Taylor). The field revenue should be initialized to zero (O). The fiel seatsAvailable should be initialized to a random number between 12 and 23 (inclusive). All fields must be declared private. o Write a method named register that reduces the seatsAvailable by one (1), and increases the revenue by 25. o Write a method named increaseWorkshopSize. This method increases the seatsAvailable by 5. o Write an accessor method to return the value of the field seatsAvailable. o Write a method named workshopEquals that takes two (2) parameters and returns a boolean value. The fir parameter is a String named title. The second parameter is a String named presenter. If the title and the presenter passed in to the method are the same as the title and presenter of this object, then return true. Otherwise they are not equal, so return false. Note: the case of the letters in the Strings should not make a difference. o Write a method named workshopToString that returns the details of this class as a String. This String will include all four fields and needs to be formatted like Example 1 shown below. Hint: is the newline character 2. The WorkshopSummary class displays the details of workshops available at a conference. A conference organizer would use it to manage the conference workshop registration. It stores three Workshop objects representing the workshops available at a conference. You will write a constructor, an addParticipant method and summary method for the class. o Add the three Workshop object fields to the WorkshopSummary class. Create a constructor that initializes the three fields with the values: field one ("Web Services", "Ariel Ortiz"), field two ("Artificial Intelligence", "Blair Taylor), and field three ("Distributed Computing, Joe Politz). o Write a method named addParticipant. This method takes two parameters. The first parameter is a String named title that represents the title of the workshop. The second parameter is a String named presenter that represents the presenter of the workshop. If the title and presenter parameters match the title and presenter of one of the workshops available at the conference (hint - use the workshopEquals method of the workshop in the if statement condition), use the register method of the workshop to add a participant the workshop. Use the accessor method of the workshop to retrieve the seatsAvailable at the conference and store the value in a local variable called seatsLeft. If the number of seats left is less than or equal to five (5), print the following: "The title workshop presented by presenter is almost full. The size of the workshop will be increased by 5. Then, use the increaseWorkshopSize method of the workshop to increase the available seats at the workshop. Otherwise print the following message: A participant has been added to the title workshop presented by presenter." If the workshop is not available at the conference, the addParticipant method should print the following message: "Sorry, the title workshop presented by presenter is not available at this conference." o Write a method called summary that prints the current details of the conference workshops and the total workshop revenue. This output should be formatted as Example 2, shown below. Example 1 (output showing the format for the workshopToString method of the Workshop class): Web Services presented by Ariel Ortiz => 7 seats still available This workshop has earned $325

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!