ClubEnsayos.com - Ensayos de Calidad, Tareas y Monografias
Buscar

MANEJO DE RESERVAS Y VENTAS DE BOLETOS EN UN CINE


Enviado por   •  20 de Enero de 2019  •  Tutoriales  •  9.749 Palabras (39 Páginas)  •  92 Visitas

Página 1 de 39

MANEJO DE RESERVAS Y VENTAS DE BOLETOS EN UN CINE.

La empresa de proyección de películas en salas CineUAO  desea obtener un sistema de reserva y venta de boletos.

El sistema debe permitir asignar a cada sala de cine una película y el número de sillas que tiene disponible la sala.

Cuando una persona solicita una reserva debe informar cuantos puestos desea ocupar, una vez se realiza esta operación se reservan las sillas solicitadas por el cliente y se le asigna una clave para que las solicite al momento de llegar al cine. Esto hace que el número de sillas libres disminuya y el número de sillas reservadas aumente.

Cuando alguien compra una o varias sillas para ver la película, el número de sillas disponibles disminuye y el número de sillas ocupadas aumenta.

En el momento de comprar unas sillas reservadas se debe presentar la clave que generó el sistema, con este número se obtiene el numero del sillas reservadas, las cuales pasan de ser reservadas a ser ocupadas.

En cualquier momento se puede consultar por el numero de sillas libres, el numero de sillas reservas, el numero de sillas ocupadas.

También se puede ver el listado de las cantidades de sillas reservadas sin mostrar la clave pues es un número secreto.

El sistema debe emitir un tiquete para presentar a la entrada del cine y con el numero de la cedula de la persona se puede consultar si tiene tiquete comprador, cuantas sillas y para que pelicula.

import javax.microedition.pim.*;

import java.util.Enumeration;

import java.util.Calendar;

import java.util.Date;

public class PIMTest  {

    public PIMTest() {

    }

    /**************************************************************************

    * Contact/ContactList sample code

    ***************************************************************************/

    public void createAContact() {

        // Create a support contact entry in the device's

        //local address book

        // so that the users have has the contact

        //information for anything that they

        // need help with about your application

        PIM pim = PIM.getInstance();

        ContactList cl = null;

        Contact new_contact = null;

        try {

            // Open write only since you're just going to

            // add your support contact

            // info to the device's database

            cl = (ContactList)

              pim.openPIMList(PIM.CONTACT_LIST, PIM.WRITE_ONLY);

        } catch (PIMException e) {

            // failed opening the default contact list!

            // Error case - abort this attempt

            System.err.println(

              "Error accessing database - aborting action");

            return;

        } catch (SecurityException e) {

            // user rejected application's request for

            //write access to contact list

            // This is not an error condition and can be normal

            System.out.println(

                "Okay, this application won't add the contact");

            return;

        }

        // Create an "empty" contact to work with

        new_contact = cl.createContact();

        // Add your company's info: company name,

        //two support phone numbers, a support

        // email, and a note about what product the user has.  Add whatever

        // information that the native contact list

        //supports and don't add it if

        // the field is not supported.

        if (cl.isSupportedField(Contact.ORG))

            new_contact.addString(Contact.ORG, PIMItem.ATTR_NONE,

               "Acme, Inc.");

        if (cl.isSupportedField(Contact.TEL)) {

            new_contact.addString(Contact.TEL, PIMItem.ATTR_NONE,

              "800-888-8888");

            new_contact.addString(Contact.TEL, PIMItem.ATTR_NONE,

              "800-888-8889");

        }

        if (cl.isSupportedField(Contact.EMAIL))

            new_contact.addString(Contact.EMAIL,

               PIMItem.ATTR_NONE, "support@acme.com");

        if (cl.isSupportedField(Contact.NOTE))

            new_contact.addString(Contact.NOTE, PIMItem.ATTR_NONE,

              "You've purchased application XXX with registration number NNN.");

        try {

            // commits it to the list and the native database

            new_contact.commit(); // commits it to the list and the native database

        }

        catch (PIMException e) {

            // failed committing the contact

             System.err.println(

                "This application cannot add the contact info");

...

Descargar como (para miembros actualizados)  txt (30.7 Kb)   pdf (162.4 Kb)   docx (34.1 Kb)  
Leer 38 páginas más »
Disponible sólo en Clubensayos.com