This preview shows page 1. Sign up to view the full content.
Unformatted text preview: ENGR131 Homework 8: Classes Due at 11:59 PM on Tuesday November 6, 2007. Submit your .java files as required by your TA. Grading: Problem 1 (30 pts). Problem 2 (30 pts). Problem 3 (30 pts). General (10 pts). Instructions: The goal of this assignment is to practice writing classes. Because different classes serve different purposes, you will work with all three varieties: application, template, and library. Each problem requires you to write two .java files. The first will contain either a template class or a library class, and the other will contain an application class that uses the class in the first file. 1. Write a template class called Team that contains variables for a team name, number of wins, and number of losses. The constructor should receive the team name and set it appropriately. Include four separate methods that perform the following tasks: (a) set the number of wins and losses, (b) return the team name, (c) return the number of wins, and (d) return the number of losses. Write an application class that creates two teams the number of wins, and (d) return the number of losses....
View Full Document
- Spring '07