vendredi 20 novembre 2020

Update- request user input for application [closed]

I am new to coding and I have created a main method. Im looking for the system to ask the users for input which greeting card do they want. My code works but it runs one after the other. The question would be"Which greeting card do you want?" and they get to pick which one.

I have worked the code so and it shows all of the cards at once. Im trying to get it to be specific to the users input and only show that output. e.g I want a bday card and then show the bday card. Not the other ones

I'd appreciate your help thanks so much.

public class GreetingCardApp {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        //main method
        //declare and create an instance of wedding card using the construction design pattern

        GreetingCard cardWedding = new wedding();
        cardWedding.completeCard();
       
        GreetingCard cardXmasCard = new XmasCard();
        cardXmasCard.completeCard();

    }

}

Aucun commentaire:

Enregistrer un commentaire