/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package stack1325; import java.util.Scanner; /** * * @author jcmt */ public class Stack1325Test { /** * @param args the command line arguments */ public static void main(String[] args) { // TODO code application logic here Stack1325 dumbo = new Stack1325(-40); //negative Stack1325 babar = new Stack1325(); int i, j = 5; Lab2stuff2 stooff = new Lab2stuff2(); Scanner scanin = new Scanner(System.in); int[] ttar = stooff.getTestar(); for (i = 0; (i < 5) && (j!=6); i++) { System.out.println(stooff.getTestdaElement(i).getTime()) ; System.out.println(stooff.getTestarElement(i)) ; if (j != 6) // goto SOMEPLACEELSE; { System.out.println(stooff.getvalsElement(i)) ; System.out.println(ttar[i]); } } System.out.println("Does this apt have a patio? Enter 1 for yes, 0 for no "); j = scanin.nextInt(); stooff.setPatio(j); //System.out.println(stooff.toString()); /* * stooff.start_lease(6, 2, 2013, 12); System.out.println(stooff.toString()); stooff.set_stuff("Far, far away", 6, 8.431); System.out.println(stooff.toString()); stooff.set_stuff("Over the rainbow"); System.out.println(stooff.toString()); stooff.set_stuff(42); System.out.println(stooff.toString()); stooff.set_stuff(4, 7, 1962); System.out.println(stooff); */ /* for (i = 0; i < 40; i++) { dumbo.push(i); } dumbo.stkInspector(); for (i = 0; i < 20; i++) //try to overfill babar { if (!babar.push(dumbo.pop())) //dumbo pops even if not pushed { System.out.println("Babar is full. He ate too much hay."); } } System.out.println("Babar has:"); babar.stkInspector(); System.out.println("Dumbo has:"); dumbo.stkInspector(); dumbo.push('p'); System.out.println("Dumbo has:"); dumbo.stkInspector(); if (!dumbo.push(-333)) { System.out.println("Elephants can't manage time negatively."); } System.out.println("Dumbo has:"); dumbo.stkInspector(); if (!dumbo.push(5)) { System.out.println("Elephants can't manage time negatively."); } System.out.println("Dumbo has:"); dumbo.stkInspector(); */ } }