Programme de gestion des réservations d'un hôtel

Résolu
cs_walidos21 Messages postés 3 Date d'inscription vendredi 20 mai 2011 Statut Membre Dernière intervention 21 mai 2011 - 20 mai 2011 à 20:11
cs_walidos21 Messages postés 3 Date d'inscription vendredi 20 mai 2011 Statut Membre Dernière intervention 21 mai 2011 - 21 mai 2011 à 01:14
il s'agit de gérer des chambres d’hôtel qui peuvent être affectées a des personnes sur des intervalles de temps.le logiciel devra utiliser un model de donnée permettant de représenter ces informations,de rentrer à la main de nouvelles informations,et de vérifier que tout va bien(typiquement q'une personne donnée ne couche pas dans deux chambres différent en même temps,ou que 2personnes n'ont pas récupéré la même chambre par accident.
.il faut gérer les chambres d’hôtel de type(simple ,double ,triple) à des client sur un intervalle de temps.
.la saisie de données concernant le client se fait manuellement tout en offrant la possibilité de modifier ces informations à tout moment.
ceci est aussi valable pour les chambres,en cas ou on voudrait modifier l'un des caractéristiques de la chambre tel que le type(simple,double,triple),le prix(en fonction des saisons)
pour la réservations il faut prévoir des modifications à savoir modifications de la la durée du séjour...
il peut aussi possible de consulter l'état des chambres,client,réservations.
.statistiques.
(interfacer graphique+connexion à une base de donnée)
si quelqu’un peut m'aider comment le faire.
A voir également:

4 réponses

Utilisateur anonyme
20 mai 2011 à 23:18
Concernant ta partie graphique, tu utilises Swing ? Ou tu fais de la JEE ?

Sinon, avec le peu de temps que j'ai et ne connaissant pas ton code, voici vite fait l'architecture pour gérer des clicks sur des boutons

private JButton btValider = new JButon("Valider");

btValider.addActionListener( new ActionListener(this));

// méthode qui te permet de gérer ce genre d'evènements
public void actionPerformed(ActionEvent ae){
   if ( ae.getSource().equals(btValider) ) {// grosso modo comme ça, tu auras besoin de faire un cast je pense
         // tu mets le code que tu veux faire
   }
}


Ta classe devra implémenter l'interface ActionListener qui te donnera la méthode actionPerformed. Ceci te permet de gérer des évènements relativement simple

--
Pylouq (actuellement jongleur de clavier AZERTY et de clavier QWERTZ)
3
goliath2002 Messages postés 43 Date d'inscription mardi 31 décembre 2002 Statut Membre Dernière intervention 20 mai 2011 1
20 mai 2011 à 20:38
Est ce que tu as deja commence ou bien tu veux commencer?


Il n'est jamais trop tard pour apprendre
2
cs_walidos21 Messages postés 3 Date d'inscription vendredi 20 mai 2011 Statut Membre Dernière intervention 21 mai 2011
20 mai 2011 à 22:00
oui j'ai déja fait l'interface graphique,mais j'ai des difficulté au niveau comment faire un événment sur chaque bouton et comment faire la connexion avec la bd
0
cs_walidos21 Messages postés 3 Date d'inscription vendredi 20 mai 2011 Statut Membre Dernière intervention 21 mai 2011
21 mai 2011 à 01:14
c'est mon essai:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package anwa;

/**
*
* @author Walid VIP
*/
import java.awt.*;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
public class test extends Frame implements ActionListener {

private TextField tf,sh,th,kh,fh;
private Prenom ch;
private Checkbox celib,mar,hom,fem;



public test(){
Frame fenetre = new Frame ("Gestionnaire des réservations d'un hotel" );
fenetre.setLayout(new FlowLayout( ));
fenetre.setBounds(100,100,250,150);
Button reserver= new Button("reserver");
Checkbox bout1 = new Checkbox("simple");
Checkbox bout2 = new Checkbox("double");
Checkbox bout3 = new Checkbox("triple");
fenetre.add(bout1);
fenetre.add(bout2);
fenetre.add(bout3);
fenetre.add(reserver);
fenetre.show( );
MenuBar mbar = new MenuBar( );
Menu meprinc1 = new Menu("consulter");
Menu meprinc2 = new Menu("modifier");
Menu meprinc3 = new Menu("prix");
MenuItem item1 = new MenuItem("client");
MenuItem item2 = new MenuItem("etat chambre");
MenuItem item3 = new MenuItem("modifier_client");
MenuItem item4 = new MenuItem("modifier_chambre");
Menu meprinc4 = new Menu("quitter");
fenetre.setMenuBar(mbar);
meprinc1.add(item1);
meprinc1.add(item2);
meprinc2.add(item3);
meprinc2.add(item4);


mbar.add(meprinc1);
mbar.add(meprinc2);
mbar.add(meprinc3);
mbar.add(meprinc4);
reserver.addActionListener( new ActionListener(this));
{
public void actionPerformed(ActionEvent ae){
if ( ae.getSource().equals(reserver)&& ae.getSource().equals(bout1) )
Panel tfPanel = new Panel(
new FlowLayout(FlowLayout.LEFT));tfPanel.setBackground(Color.lightGray);
tfPanel.add(new Label("nom"));
tf = new TextField(15);
tfPanel.add(tf);
//nom
Panel chPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
chPanel.setBackground(Color.lightGray);
chPanel.add(new Label("prénom"));
ch=new TextField(15);
tfPanel.add(ch);
//prenom

Panel shPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
shPanel.setBackground(Color.lightGray);
shPanel.add(new Label("cin"));
sh=new TextField(8);
tfPanel.add(sh);
//cin

Panel thPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
thPanel.setBackground(Color.lightGray);
thPanel.add(new Label("date-entree"));
th=new new TextField(8);
tfPanel.add(th);
// date entree


Panel khPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
khPanel.setBackground(Color.lightGray);
khPanel.add(new Label("nombre_personne"));
kh=new TextField(2);
kfPanel.add(th);
//nombre personne

Panel fhPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
fhPanel.setBackground(Color.lightGray);
fhPanel.add(new Label("durée_reservations"));
fh=new TextField(2);
fhPanel.add(th);
// durée reservations


// Checkbox panel
Panel cbPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
cbPanel.setBackground(Color.lightGray);
cbPanel.add(celib = new Checkbox("célibataire"));
cbPanel.add(mar= new Checkbox("marier"));
//situations


// Checkbox panel
Panel cbPanel = new Panel(new FlowLayout(FlowLayout.LEFT));
cbPanel.setBackground(Color.lightGray);
cbPanel.add(hom = new Checkbox("homme"));
cbPanel.add(fem = new Checkbox("femme"));



setLayout(new GridBagLayout());
GridBagConstraints gbc =new GridBagConstraints();
gbc.fill = GridBagConstraints.BOTH;
gbc.gridwidth = GridBagConstraints.REMAINDER;
gbc.insets = new Insets(5,0,0,0); // top
add(thPanel,gbc);
add(chPanel,gbc);
add(khPanel,gbc);
add(cbPanel,gbc);
add(fhPanel,gbc);
gbc.insets = new Insets(5,0,5,0);

add(thPanel,gbc);
}


{













}

}}
}

}















}
0
Rejoignez-nous