{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

HW08 Solution4

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

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

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()

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

View Full Document
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

{[ snackBarMessage ]}

### Page1 / 2

HW08 Solution4 - CardLibrary.printValue(card1...

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

View Full Document
Ask a homework question - tutors are online