Question

In: Computer Science

Need Java code for a small business for booking on various circus shows / online shows...

Need Java code for a small business for booking on various circus shows / online shows because of covid

Just need template I will add prices in my self

Solutions

Expert Solution

// Skeleton code in Java to design an online Circus booking system.
Enums :

   public enum SeatStatus {
   SEAT_BOOKED,
   SEAT_NOT_BOOKED;
}

public enum CircusStatus {
   Circus_Available,
   Circus_NotAvailable;
}

public enum CircusType {
   ENGLISH,
   HINDI;
}

public enum SeatType {
   NORMAL,
   EXECUTIVE,
   PREMIUM,
   VIP;
}

public enum PayStatus {
   PAID,
   UNPAID;
}

class User {

   int userId;
   String name;
   Date dateOfBirth;
   String mobNo;
   String emailId;
   String sex;
}

class Circus {

   int CircusId;
   int tentId;
   CircusType CircusType;
   CircusStatus CircusStatus;
}

class tent {

   int tentId;
   String tentName;
   Address address;

   List<Circus> Circuss;
   float rating;
}

class Booking {
   int bookingId;
   int userId;
   int CircusId;
   List<Circus> bookedSeats;
   int amount;
   PayStatus status_of_pay;
   Date booked_date;
   Time Circus_timing;
}

class Address {

   String city;
   String pinCode;
   String state;
   String streetNo;
   String landmark;
}

Extra: Handing the cases where two persons are trying to access the same seat almost same time
Class SeatBook
{
   Transaction transaction_obj;
   bool seats[total_seats];
   String place;
   String ticketType;

   bool check_availability();

   int position_of_seat()
   {
       return seat_pos_in_theator;
   }

   void multiple tickets();

   void final_booking()
   {
       place = positon_of_seat();
       if (single_ticket)
           continue;
       else
           mutliple_ticket_booking();

       Transaction_obj.pay(ticketType, seats_booked, place);
   }
}

Please Upvote if you like my answer and efforts. Thank you


Related Solutions

Just need java code for a small business that books shows and gives out a receipt...
Just need java code for a small business that books shows and gives out a receipt after placing order on what show they want
JAVA JAVA JAVA Hey i need to find a java code for my homework, this is...
JAVA JAVA JAVA Hey i need to find a java code for my homework, this is my first java homework so for you i don't think it will be hard for you. (basic stuff) the problem: Write a complete Java program The transport Company in which you are the engineer responsible of operations for the optimization of the autonomous transport of liquid bulk goods, got a design contract for an automated intelligent transport management system that are autonomous trucks which...
**NEED ACTUAL JAVA CODE** Basically this code is defining the board for the game tigers and...
**NEED ACTUAL JAVA CODE** Basically this code is defining the board for the game tigers and goats or 'Bagh chan'. Ive posted the other 3 classes that I need help with, didnt want to put all 4 in one question. public class GameViewer implements MouseListener { // instance variables private int bkSize; // block size - all other measurements to be derived from bkSize private int brdSize; // board size private SimpleCanvas sc; // an object of SimpleCanvas to draw...
**NEED ACTUAL JAVA CODE** Basically this code is defining the board for the game tigers and...
**NEED ACTUAL JAVA CODE** Basically this code is defining the board for the game tigers and goats or 'Bagh chan'. Ive posted the other 3 classes that I need help with, didnt want to put all 4 in one question. /** * Maintains and updates the status of the board * i.e. the locations of goats and tigers * * @Student 1 Name: * @Student 1 Number: * * @Student 2 Name: * @Student 2 Number: */ public class Board...
I need a full java code. And I need it in GUI With the mathematics you...
I need a full java code. And I need it in GUI With the mathematics you have studied so far in your education you have worked with polynomials. Polynomials are used to describe curves of various types; people use them in the real world to graph curves. For example, roller coaster designers may use polynomials to describe the curves in their rides. Polynomials appear in many areas of mathematics and science. Write a program which finds an approximate solution to...
JAVA Copy the attached code into your IDE or an online compiler and test an additional...
JAVA Copy the attached code into your IDE or an online compiler and test an additional type with the generic class. Submit your code and execution display. JAVA The test cases for Integer and String is given in the code. Please add test cases for Character, Boolean and Double type etc. // A Simple Java program to show working of user defined // Generic classes    // We use < > to specify Parameter type class Test<T> {     //...
My imaginary business is Swimwear Imagine that you are a small online retailer and your business...
My imaginary business is Swimwear Imagine that you are a small online retailer and your business is picking up greatly, especially in some markets. Create a list of products that you sell, who your target market is, how you differentiate, and discuss optimal strategies for the 4Ps of marketing for your retail business. Discuss how these strategies would differ if you added a physical retail location.
We probably have all seen various stock analysts and investment professionals on various business shows on...
We probably have all seen various stock analysts and investment professionals on various business shows on television arguing over whether a particular common stock is undervalued, overvalued, or correctly valued. For the sake of discussion, assume that all of these analysts and investment professionals all use the same common stock valuation approaches discussed in this week’s material. Why might they still disagree on their valuation assessments? Do you believe they have any incentives to suggest that they can successfully identify...
I need this Java code translated into C Code. Thank you. //Logical is the main public...
I need this Java code translated into C Code. Thank you. //Logical is the main public class public class Logical { public static void main(String args[]) { char [][] table= {{'F','F','F'},{'F','F','T'},{'F','T','F'},{'F','T','T'},{'T','F','F'},{'T','F','T'},{'T','T','F'},{'T','T','T'}}; // table contains total combinations of p,q,& r int totalTrue, totalFalse, proposition;    //proposition 1: proposition=1; start(proposition); totalTrue=0; totalFalse=0; for(int i=0;i<8;i++) {    { char o= conjuctive(implecation(negation(table[i][0]),table[i][1]),implecation(table[i][2],table[i][0])); System.out.println(" "+table[i][0]+" "+table[i][1]+" "+table[i][2]+" "+o); if(o=='T') totalTrue++; else totalFalse++;    } } finalOutput(totalTrue,totalFalse,proposition); System.out.println(" "); System.out.println(" ");    //proposition 2: proposition=2; start(proposition);...
I need an idea of Java code that will convert an integer (1 to 3,999) into...
I need an idea of Java code that will convert an integer (1 to 3,999) into roman numerals using if statements; arrays and loops sadly aren't allowed and that's all I can come up with.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT