THINK FIRST·CODE LATER

← All labs

Kano survey analysis

Problem

Classify StudyBuddy features with the Kano model. Each respondent answers two questions per feature: the functional question ("How would you feel if the app had it?") and the dysfunctional question ("…if it did not have it?"), each with one of LIKE, EXPECT, NEUTRAL, TOLERATE, DISLIKE.

The pair gives a category from the standard Kano evaluation table (rows = functional answer, columns = dysfunctional answer):

LIKE EXPECT NEUTRAL TOLERATE DISLIKE
LIKE Q A A A O
EXPECT R I I I M
NEUTRAL R I I I M
TOLERATE R I I I M
DISLIKE R R R R Q

A = Attractive, O = One-dimensional, M = Must-be, I = Indifferent, R = Reverse, Q = Questionable.

Input: lines feature functional dysfunctional until the end of input (feature names have no spaces). For each feature, in order of first appearance, print

feature: M=.. O=.. A=.. I=.. R=.. Q=.. -> CATEGORY

where CATEGORY is the full name (Must-be, One-dimensional, Attractive, Indifferent, Reverse, Questionable) of the most frequent category; on a tie, the earlier one in the order M, O, A, I, R, Q wins.

Input:

SSO EXPECT DISLIKE
SSO NEUTRAL DISLIKE
SlideLink LIKE NEUTRAL
SSO LIKE DISLIKE
SlideLink LIKE TOLERATE
Themes NEUTRAL NEUTRAL

Output:

SSO: M=2 O=1 A=0 I=0 R=0 Q=0 -> Must-be
SlideLink: M=0 O=0 A=2 I=0 R=0 Q=0 -> Attractive
Themes: M=0 O=0 A=0 I=1 R=0 Q=0 -> Indifferent

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.

s3-3-data-1.txt

SSO EXPECT DISLIKE
SSO NEUTRAL DISLIKE
SlideLink LIKE NEUTRAL
SSO LIKE DISLIKE
SlideLink LIKE TOLERATE
Themes NEUTRAL NEUTRAL
What your program must print for s3-3-data-1.txt
SSO: M=2 O=1 A=0 I=0 R=0 Q=0 -> Must-be
SlideLink: M=0 O=0 A=2 I=0 R=0 Q=0 -> Attractive
Themes: M=0 O=0 A=0 I=1 R=0 Q=0 -> Indifferent

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 < s3-3-data-1.txt

Windows PowerShell does not understand <:

Get-Content s3-3-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.