problem 2 agile or waterfall create a gui for your agile or waterfall program from l 5153409

Problem 2: Agile or Waterfall?

Create a GUI for your Agile or Waterfall program from Lab 3.

Add these components to AgileWaterfallGUI.form. Again, use these names.

JTextField projectName

JSlider peopleOnTeam This should take values between 1 and 300. Add JLabels with the text “1” at the start, and “300” at the end, to indicate the start and end values.

JCheckBox firmDeadlines

JCheckBox experienceAllPhases

JCheckBox qualityControl

JCheckBox earlyIntegration

JCheckBox earlyWorkingModels

JButton recommendMethodology

JLabel recommendation

Add more JLabels as appropriate, for example, to indicate what to type into the JTextField, and label the JSlider with a name, and max and min values.

Your program may re-use the agileOrWaterfall method you wrote in Lab 3.

Add a ActionListener (click) event listener to the recommendMethodology button. When clicked, this button will read the data entered, and recommend Waterfall or Agile or either for a development method for the project. Display the recommendation in the recommendation JLabel.

Use the provided Strings AGILE, WATERFALL and EITHER and RECOMMENDATION_TEMPLATE to display the result.

Your GUI program should use a JLabel and the recommendationTemplate format String provided to display something like “Big IBM Project could use Waterfall” or “My assignment could use Agile” or “Banking App could use either”

package week_8.agile_waterfall; import javax.swing.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener;
/** The instructions are in grades/Lab 8 */ public class AgileWaterfallGUI extends JFrame { private JPanel mainPanel; private JTextField projectName; private JSlider peopleOnTeam; private JCheckBox firmDeadLines; private JCheckBox experienceAllPhasesCheckBox; private JCheckBox qualityControlCheckBox; private JCheckBox earlyIntegrationCheckBox; private JCheckBox earlyWorkingModelsCheckBox; private JCheckBox firmDeadlines; private JCheckBox experienceAllPhases; private JCheckBox qualityControl; private JCheckBox earlyIntegration; private JCheckBox earlyWorkingModels; private JLabel recommendation; private JButton recommenMethodologyButton; private JButton recommendMethodology; public final static String
AGILE = “Agile”; public final static String
WATERFALL = “Waterfall”; public final static String
EITHER = “either”; public final static String
RECOMMENDATION_TEMPLATE = “%s could use %s”; AgileWaterfallGUI() { setContentPane(mainPanel); pack(); setDefaultCloseOperation(WindowConstants.
EXIT_ON_CLOSE); setVisible(true); recommendMethodology.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { try{ int teamSize = peopleOnTeam.getValue(); boolean deadline = firmDeadlines.isSelected(); boolean allPhase = experienceAllPhases.isSelected(); boolean earlyModel = earlyWorkingModels.isSelected(); boolean quality = qualityControl.isSelected(); boolean earlyInt = earlyIntegration.isSelected(); int agileScore = 0; int waterfallScore = 0; String name = projectName.getText(); if (teamSize>30){ waterfallScore=waterfallScore+1; } if(deadline){ waterfallScore=waterfallScore+1; } if (allPhase){ agileScore=agileScore+1; } if(quality){ waterfallScore=waterfallScore+1; } if(earlyModel){ agileScore=agileScore+1; } if(earlyInt){ agileScore=agileScore+1; } if (agileScore > waterfallScore) { recommendation.setText(name+” could use “+
AGILE); } if (waterfallScore>agileScore) { recommendation.setText(name+” could use “+
WATERFALL); } if (waterfallScore==agileScore) { recommendation.setText(name+” could use “+
EITHER); } }catch(Exception NullPointerException){ System.
out.println(“Null pointer exception”); } } }); //
TODO any GUI configuration needed
TODO add event handler to read the data entered, and selections made,
TODO recommend a methodology, display in JLabel.
// Use the recommendationTemplate to display a String like “Android App should use Agile” } private void createUIComponents() { //
TODO: place custom component creation code here
} }

"Get 15% discount on your first 3 orders with us"
Use the following coupon

Order Now