This is InetlliJ Idea Java programming Problem 2 Agile or Wa
This is InetlliJ Idea Java programming.
Problem 2, Agile or Waterfall:
Write a program that can help decide if a particular programming project is best solved using a Waterfall or Agile methodology.
Your program should ask the user:
How many programmers will be on the team If there needs to be firm deadlines and a fixed schedule. If the programmers have experience in requirements, analysis and testing as well as coding. If there are stringent quality control requirements.If early integration is desirable
If the customer will be requiring working models early in the process.Write a method called agileOrWaterfall, which takes this data as argument(s) and returns an opinion on whether Agile or Waterfall is best. Use this method in your program to suggest which methodology to use.
Your main method should do all of the asking questions and printing the result. Your agileOrWaterfall method should be given the relevant data, and do the processing, deciding, and returning the result.
Solution
PROGRAM CODE:
import java.util.*;
import java.lang.*;
import java.io.*;
/* Name of the class has to be \"Main\" only if the class is public. */
public class ProjectPlanning
{
public static String agileOrWaterfall(int num_prog, boolean[] answers)
{
if(num_prog >5 && !answers[0] && answers[1] && answers[2] && answers[3] && answers[4])
return \"This project is best solved using agile methodology\";
else
return \"This project is best solved in waterfall methodology\";
}
public static void main (String[] args)
{
int ProgrammerCount;
boolean[] trueOrFalseAnswers = new boolean[5];
Scanner sc = new Scanner(System.in);
System.out.println(\"Number of Programmers: \");
ProgrammerCount = sc.nextInt();
System.out.println(\"Are the deadlines fixed?: \");
trueOrFalseAnswers[0] = sc.nextBoolean();
System.out.println(\"Are there experienced testers, coders and analysts?\");
trueOrFalseAnswers[1] = sc.nextBoolean();
System.out.println(\"Is the quality control stringent?\");
trueOrFalseAnswers[2] = sc.nextBoolean();
System.out.println(\"Is early integration needed?\");
trueOrFalseAnswers[3] = sc.nextBoolean();
System.out.println(\"Are working models needed early?\");
trueOrFalseAnswers[4] = sc.nextBoolean();
System.out.println(agileOrWaterfall(ProgrammerCount, trueOrFalseAnswers));
}
}
OUTPUT:
Number of Programmers:
20
Are the deadlines fixed?:
false
Are there experienced testers, coders and analysts?
true
Is the quality control stringent?
true
Is early integration needed?
true
Are working models needed early?
true
This project is best solved using agile methodology

