Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Burdell and the Buzz Problem Description As an aspiring band manager, you need to promote your band and expand publicity. Being hip with

In Java

Burdell and the Buzz

Problem Description

As an aspiring band manager, you need to promote your band and expand publicity. Being hip with the times, you know that social media can make or break a bands popularity. So, you decide to bring some lucky Georgia Tech students to spread the good word!

Solution Description

Write the Concert, Musician, and Fan classes to guide your band on their rock star journey. You will design these classes from scratch following the instructions below, so no les are provided. Note: When creating the specied getter and setter methods for each class, use the naming convention taught in class, e.g. getTicketPrice() and setDate().

Concert.java

Fields

This class has the following private elds, and associated getter methods:

double ticketPrice. General Admission ticket price.

int capacity. Venue capacity.

int ticketsSold. Number of tickets sold.

String location. Location of the concert.

String date. The date of the concert in the format MM/DD/YYYY. For example, 02/14/2019. Constructor

This class has the following constructors:

There are two constructors (hint: use constructor chaining)

The rst constructor takes the following four arguments and assigns them to instance variables in the order listed:

Ticket price

Capacity

Location

Date

Do not include ticketsSold as a parameter; rather, set its eld to 0 within the constructor.

The second constructor takes the following three arguments and assigns them to instance variables in the order listed:

Capacity

Location

Date

Do not include ticketsSold as a parameter; rather, set its eld to 0 within the constructor. Additionally, do not include ticketPrice as a parameter; rather, set its eld to 30 within the constructor.

Methods

This class has the following public methods:

boolean isSoldOut(). Using the capacity and ticketsSold elds, return whether or not this concert is sold out.

void sellTicket(). Increment the counter for the number of tickets that have been sold. If the concert is already sold out, you should not change the number of tickets that have been sold.

String toString(). Returns a String in this format:

A concert on at

Setters for both location and ticketPrice.

Musician.java

Fields

This class has the following private elds, and associated getter methods:

String name. Name of the musician.

String instrument. Name of the musicians weapon of choice.

int yearsPlaying. Number of years the musician has been playing the instrument.

double skillLevel. Related to yearsPlaying, more to explain shortly.

Constructor

This class has the following constructors:

There are two constructors (hint: use constructor chaining)

The rst constructor takes the following three arguments and assigns them to instance variables in the order listed:

Name

Instrument

Years Playing

The other constructor takes two parameters in the order listed and sets 0 as the value for yearsPlaying:

Name

Instrument

The skillLevel instance variable is determined inside the constructors by the value for yearsPlaying. At 0 years played, skillLevel is 1.0. Add 0.5 to skillLevel for every additional year played.

Methods

This class has the following public methods:

void rehearse().

Increases skillLevel by 0.5 and yearsPlaying by 1 when called.

void perform().

Increases skillLevel by 1 when called.

String toString().

Returns a string that prints out the musicians name, what instrument they play, and how long theyve been playing for. (No need to worry about year vs. years here)

For example:

My name is Taylor Swift. I have been playing guitar for 10 years.

Fan.java Fields

This class has the following private elds, and associated getter methods:

int yearsAsFan. How many years this person has been a fan of the band.

int albumsBought. Number of albums that this fan has bought.

int concertsAttended. Number of concerts this fan has attended.

boolean buzzcard. Boolean representing whether or not this fan has their Buzzcard.

Musician favoriteMusician. This fans favorite musician.

Constructor

This class has the following constructor:

The rst constructor takes the following ve arguments and assigns them to instance variables in the order listed:

Number of years as a fan

Number of albums bought

Number of concerts attended

Whether or not they have a Buzzcard

Their favorite musician

Methods

This class has the following public methods:

boolean winGiveaway().

This method returns whether or not the fan wins the giveaway. However, since we want fans to attend, this will always return true! (Even though they win, they still need to pay for a ticketyour band needs the revenue..)

String liveTweet(Concert concert). Livetweeting signies that the Fan has attended a concert. This method will return a String based on the passion level of the fan. Specically, if the corresponding conditional is true, add to the tweet each time on a new line and in the order presented:

If the fan has been following the band for over 5 years, the tweet will include: Best band ever!

If the fan paid more than $100 for a ticket, the tweet will include: Totally worth my entire bank account!

(Hint: you created a getter method for ticket price within the Concert class, and you passed in a Concert parameter to this method)

If the fan has bought at least one album, the tweet will include: Even better in person!

At the end of every live tweet, it will always include: Ive been to concerts! The fan assumes that this concert does count towards the total number of concerts they have attended in this statement. Update any necessary variables accordingly.

Use a ternary statement to indicate the word concert if this is the fans rst concert, and the word concerts otherwise. Proper grammar is essential for any successful manager.

For example, if we have a Fan named Joe Schmo who has been a fan for 10 years, paid $200 for a ticket, bought 5 albums, and has been to 4 concerts (including this one), the tweet should read:

Best band ever!

Totally worth my entire bank account!

Even better in person!

Ive been to 4 concerts!

void lostBuzzcard(). Every Georgia Tech student needs to keep careful track of their Buzzcard! But, sometimes we get a little reckless.

If the fan has been following the ban for over 3 years, set the boolean buzzcard to false.

void announceFavoriteMusician(). This method should print:

My favorite musician is ! ConcertSimulator.java

This class is purely an example of what an output could look like. Its purpose is for you to test your code to produce the correct provided output. You do not have to submit this le. - Create 2 Musicians Christopher W. Klaus has been playing violin for 30 years - UGA has been playing students for 234 years Create 1 Fan - Gerald Clough - 14 years as a fan, 8 albums bought, 52 concerts attended, has his Buzzcard, and his favorite musician is Christopher W. Klaus - Announce Gerald Cloughs favorite Musician - Create 1 Concert - Ticket price is $500 - Venue capacity is 60 seats - Location is Mercedes-Benz Stadium - Date is 02/03/2019 - Sell 60 tickets then see whether or not the concert is booked - If it is, print Sorry! [details of concert] is fully booked! - Is there a way to print the details of the concert without hardcoding? - Print out Gerald Clough livetweeting (Note: This increases his total number of concerts attended by one) - The sample output is as follows:

My name is Christopher W. Klaus. I have been playing violin for 30 years.

My name is UGA. I have been playing students for 234 years.

My favorite musician is Christopher W. Klaus! Sorry!

A concert on 02/03/2019 at Mercedes-Benz Stadium is fully booked!

Best band ever!

Totally worth my entire bank account!

Even better in person!

Ive been to 53 concerts!

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

Practical Database Programming With Visual C# .NET

Authors: Ying Bai

1st Edition

0470467274, 978-0470467275

More Books

Students also viewed these Databases questions

Question

1. Describe the types of power that effective leaders employ

Answered: 1 week ago