Posts

Showing posts from December, 2020

Week 8 Java Project [Ticket.java]

  /**  * ITEC 8030 Week 8 Project  *  @author  AMARE  */ import   java . text . SimpleDateFormat ; import   java . util . Date ; public   class   Ticket   {    SimpleDateFormat   d  =  new   SimpleDateFormat ( "dd/MM/yyyy" );      private   long   number ;      private   String   category  =  new   String ();      private   String   holder  =  new   String ();      private   Date   date  =  new   Date ();      private   double   price ;      private   boolean   purchaseStatus ;          /**      * The parameterized constructor method accepts arguments   ...

Week 8 Java Project [Merchandise.java]

  /**  *  *  @author  AMARE  */ public   class   Merchandise   {      private   long   id ;      private   String   category  =  new   String ();      private   String   description  =  new   String ();      private   double   price ;      private   boolean   inStock ;                  /**          * No argument constructor method for merchandise          */          public   Merchandise ()         {               ...

Week 8 Java Project [AmusementParkTester.java]

  /**  *  @author  AMARE  *   */ import   java . util . Date ; import   java . util . InputMismatchException ; import   java . util . Scanner ; public   class   AmusementParkTester   { /**  * The no argument constructor method returns date  *  @return    */        public   static   Date   createDay (){          Date   d  =  new   Date ();          return   d ;     } /**  * The parameterized constructor method references object  *  @param   p    */        public   static   void   runPark ( AmusementPark   p )         {        ...

Week 8 Java Project [AmusementPark.java]

  /**  *  *  @author  AMARE  */ import   java . util .*; public   class   AmusementPark   {    private   ArrayList < Ticket >  tickets  =  new   ArrayList < Ticket >();          private   ArrayList < Merchandise >  merchandise  =  new   ArrayList < Merchandise >();          private   String   name  =  new   String ();                  /**          * The parameterized constructor method           *  @param   name            */          public   AmusementPark ...