# Difference between revisions of "NSS Easy"

Each of these queries is worth 9 points.

## How many computing

Show how many responses were gathered for question 1, UKPRN 10007772, with subject "(8) Computer Science"

The for loop is used to inspect every one of the 50000 records until we find the one that matches the conditions. We need three different conditions to be true:

• nss.question == 1
• Notice that we use == to compare two integers
• nss.subject.equals("(8) Computer Science")
• nss.UKPRN.equals("10007772")
Notice that the members of the NSS class are: UKPRN institution subject question answered response sample We want the print statement to fire only if all three conditions are true - so we combine the conditions with the && operator.

```if (nss.UKPRN.equals("10007772") &&
nss.question==1 &&
nss.subject.startsWith("(8)"))
System.out.println(nss.response);
```

[Font] [Default] [Show] [Resize] [History] [Profile]

## Big Computing Departments

Show the name of every institution where the sample for question 1 for the subject “(8) Computer Science” is at least 300

You should check the value nss.sample

[Font] [Default] [Show] [Resize] [History] [Profile]

## Good Computing Departments

Show the names of the institutions where more than 50% of students DEFINITELY_AGREE with question 1 for the subject “(8) Computer Science”.

[Font] [Default] [Show] [Resize] [History] [Profile]

## High Scoring Computing Departments

Show the names of the institutions where more than 90% of students DEFINITELY_AGREE or MOSTLY_AGREE with question 1 for the subject “(8) Computer Science”.

[Font] [Default] [Show] [Resize] [History] [Profile]

## How many students in Computing? How many in Art & Design?

Show the total number of students who responded to question 22 for the subject “(8) Computer Science” show the same figure for the subject “(H) Creative Arts and Design”.

[Font] [Default] [Show] [Resize] [History] [Profile]