[Solved] COP 2800 Assignment 6

$25

File Name: COP_2800_Assignment_6.zip
File Size: 197.82 KB

SKU: [Solved] COP 2800 Assignment 6 Category: Tag:
5/5 - (1 vote)

Go Dolphins!!!This assignment is a simulation of beer drinking football fans and the security guards that love them.

Design Requirements:Class Beer Tracks whether it is full or empty and has a getter. Also, has a drink method.Class SixPack Starts with an array of 6 beers, dispenses beers up to 6, and has a toString.Class Person Has a first and last name, getters, and a toStringClass NFLFan Extends Person, drinks beers and keeps count, getter and toStringClass StadiumSecurity Extends Person, chews out fans whove had more than 2 beers, getter and toString

Please title your java file Assignment6.java. Submitted files that do not compile will receive a grade of 0.

Next page sample output and the driver used to generate it

No output from the class definitions. All the output was done from this driver:

public class Assignment6 {

public static void main (String [] arg) {

SixPack sixPack = new SixPack();

NFLFan steve = new NFLFan(steve, harris);

NFLFan rick = new NFLFan(rick, newhouse);

StadiumSecurity bobTheSecurityGuard =

new StadiumSecurity(bob, modino);

steve.drinkBeer (sixPack.getABeer());

System.out.println(steve);

System.out.println(sixPack);

rick.drinkBeer (sixPack.getABeer());

rick.drinkBeer (sixPack.getABeer());

rick.drinkBeer (sixPack.getABeer());

System.out.println(rick);

System.out.println(sixPack);

bobTheSecurityGuard.challengeBeerDrinker (steve);

bobTheSecurityGuard.challengeBeerDrinker (rick);

System.out.println(bobTheSecurityGuard);

}

}Note: This is not the driver I will use to test your program. I will check for these implementation errors:

  • A fan upping his beer count by drinking an empty beer
  • A six pack that dispenses more than six beers
  • A security guard yelling at a fan who is under the beer limit
  • etc

Reviews

There are no reviews yet.

Only logged in customers who have purchased this product may leave a review.

Shopping Cart
[Solved] COP 2800 Assignment 6
$25