HW08 Solution4

HW08 Solution4 - CardLibrary.printValue(card1)...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 // APPLICATION CLASS FOR ALL THREE PROBLEMS public class HW08 { public static void main(String[] args) { // FOR PROBLEM #1 Team spartans spartans = new Team("Spartans") spartans.setStats(8, 0) System.out.println("Name: " + spartans.getName() + ", Wins: " + spartans.getWins() + ", Losses: " + spartans.getLosses()) Team scots scots = new Team("Scots") scots.setStats(2, 6) System.out.println("Name: " + scots.getName() + ", Wins: " + scots.getWins() + ", Losses: " + scots.getLosses()) // FOR PROBLEM #2 int card1 = CardLibrary.randomValue() int card2 = CardLibrary.randomValue()
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CardLibrary.printValue(card1) CardLibrary.printValue(card2) // FOR PROBLEM #3 Card card3, card4 card3 = new Card() card4 = new Card() card3.printValue() card4.printValue() } } Sheet1 Page 2 // Declare instance // Initialize with constructor // Set additional values // Declare instance // Initialize with constructor // Set additional values // Declare and initialize // Declare and initialize // Print the value // Print the value // Declare the instances // Initialize an instance // Initialize an instance // Print the value // Print the value...
View Full Document

This note was uploaded on 04/10/2008 for the course ENGR 131 taught by Professor Xiaowei during the Spring '07 term at Case Western.

Page1 / 2

HW08 Solution4 - CardLibrary.printValue(card1)...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online