THINK FIRST·CODE LATER

← All labs

Process advisor: agile, plan-driven or hybrid?

Problem

Implement a small advisor based on Boehm and Turner's five factors. Each project is one input line:

name criticality changePercent teamSize seniorPercent culture
  • criticality: 1 = loss of comfort, 2 = loss of some money, 3 = loss of a lot of money, 4 = loss of a life, 5 = loss of many lives
  • changePercent: % of requirements expected to change per month
  • teamSize: number of developers
  • seniorPercent: % of experienced developers
  • culture: CHAOS (people like change) or ORDER (people prefer clear procedures)

Score one point for agile or plan per factor:

Factor Agile point if… Plan point otherwise
criticality ≤ 2 ≥ 3
change ≥ 10 < 10
size ≤ 15 > 15
personnel ≥ 30 < 30
culture CHAOS ORDER

Recommendation: 4 or 5 agile points → AGILE; 4 or 5 plan points → PLAN-DRIVEN; otherwise HYBRID, and list the factors that pointed to plan (in table order: criticality, change, size, personnel, culture).

Output per project: name: AGILE (agile 4, plan 1), or for hybrids name: HYBRID (agile 3, plan 2) - plan-driven factors: criticality, size.

Input:

StudyBuddy 2 25 5 40 CHAOS
RailSignal 5 2 120 60 ORDER
BankMigration 3 15 40 50 CHAOS

Output:

StudyBuddy: AGILE (agile 5, plan 0)
RailSignal: PLAN-DRIVEN (agile 1, plan 4)
BankMigration: HYBRID (agile 3, plan 2) - plan-driven factors: criticality, size

Data for this lab

Your program reads its data from standard input. Download the file, then give it to your program as shown below. Start with data set 1: its expected output is given.

s2-4-data-1.txt

StudyBuddy 2 25 5 40 CHAOS
RailSignal 5 2 120 60 ORDER
BankMigration 3 15 40 50 CHAOS
What your program must print for s2-4-data-1.txt
StudyBuddy: AGILE (agile 5, plan 0)
RailSignal: PLAN-DRIVEN (agile 1, plan 4)
BankMigration: HYBRID (agile 3, plan 2) - plan-driven factors: criticality, size

Run your program first, then open this and compare line by line: your output must contain these lines exactly.

How to give the file to my program

Terminal (macOS, Linux, or Windows Command Prompt), after compiling:

java Main < s2-4-data-1.txt

Windows PowerShell does not understand <:

Get-Content s2-4-data-1.txt | java Main

IntelliJ IDEA: Run → Edit Configurations → Redirect input from. Or simply paste the content of the file into the console when the program waits for input.

Write it here or in your IDE, then paste it. Compile and test it yourself before comparing. Your code stays in your browser — it is never sent to or stored on the server.