Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Have you seen people code like this?

Name: Anonymous 2012-03-13 18:41

Warning:
[Spolier] CONTAINS JAVA [/Spoiler]

HOW ABOUT MY CHEESEBURGER PROGRAM PUSSIES


import javax.swing.*;

public class MultipleChoice
{
    private String option_chosen;
   
    public MultipleChoice(String[] choices,                          String                        text_prompt)
    {
        String final_choice;
       
        JFrame choice_frame = new JFrame("Professional Java Programmer");
        final_choice = (String) JOptionPane.showInputDialog(choice_frame, text_prompt, "Professional Java Programmer",
                                                            JOptionPane.QUESTION_MESSAGE, null, choices,
                                                            choices[0]);
       
        option_chosen = final_choice;       
    }

    public String getString()
    {   
        return option_chosen;
    }
}


Firm believer in splitting everything into classes all the time ;)


import javax.swing.*;

public class RateMyCheeseBurger
{
    public static final String[] cheese_rating = {"One", "Two", "Three", "Four", "THESE BURGERS ARE TOO GOOD TO PUT
INTO NUMBERS"};
                                                  
    public static String rate_burgers = "Rate Burgers";                                              
   
    public static void main (String[] args)
    {
        MultipleChoice testing_cb;
       

        testing_cb = new MultipleChoice(cheese_rating, rate_burgers);   
    }
}

Name: Anonymous 2012-03-13 18:44

Spolier

Stopped reading right there

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List