This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: For example, these numbers should work: 8646 97535 13531, and these should not: 862, 971, 134. Your method should return a boolean. Single-digit numbers should return false. Your program should prompt the user for a number and then print true or false. 40 points 4) Write a generic class called Trio that has one type parameter. It contains three items, each being of the type parameter's type. It contains three methods, first() and second(), and third(), that return one of the three items respectively. Include a main method in the class which creates a Trio object with a String type. The object should be created with three strings: "abc", "def", "ghi". Use the first(), second(), and third() methods to get each string from the Trio object and print it. Submit to WebCT. Please give the files you submit meaningful names. If necessary, include a "readme" file that describes your submission. Problem 1 can be a text file, while problems 2-4 should be source files....
View Full Document
This note was uploaded on 04/07/2008 for the course CS 3345 taught by Professor Ozbirn during the Spring '08 term at University of Texas at Dallas, Richardson.
- Spring '08
- Data Structures