Check08A - /import type.lib.*; /import...

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

View Full Document Right Arrow Icon
//import type.lib.*; //import java.text.SimpleDateFormat; //import java.util.*; //import java.io.FileNotFoundException; //import java.io.PrintStream; // //public class Check08A //{ // public static void main(String[] args) // { // PrintStream out = System.out; // Scanner in = new Scanner(System.in); // // out.print("Enter report range in years . .. "); // int years = in.nextInt(), flaggedCard = 0; // // GlobalCredit collection = GlobalCredit.getRandom(); // // Calendar current = Calendar.getInstance(), // expired = Calendar.getInstance(); // // current.add(Calendar.YEAR, years); // // out.printf("Cards expiring before %d years from now: %n", years); // // for (CreditCard card : collection) // { // out.printf("%s\t%2$td/%2$tm/%2$tY", // card.getNumber(), card.getExpiryDate()); // // expired.setTime(card.getExpiryDate()); // out.printf("%s%n", ((expired.before(current) ? "\t*" : ""))); // // flaggedCard = expired.before(current) ? flaggedCard + 1 : flaggedCard; // } // // out.printf("%nFlagged-card count = %d%n", flaggedCard);
Background image of page 1

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

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

This note was uploaded on 09/16/2011 for the course CSE CSE 1020 taught by Professor Burton,ma during the Fall '10 term at York University.

Page1 / 2

Check08A - /import type.lib.*; /import...

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