NSS Easy

From Progzoo
(Redirected from Assessment 2 2012 Easy)
Jump to: navigation, search

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"

Advice

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”.

Advice

The NSS class includes an array answered that gives the percentage of students who answered either "Definitely Disagree", "Mostly Disagree", "Neutral", "Mostly Agree" or "Definitely Agree".

  • This array has 5 values - one for each of the possible responses.
  • You can find the percentage of students who "definitely agree" in the element nss.answered[4]
  • We want to avoid using values like 4 we have constants defined. You can use nss.answered[NSS.DEFINITELY_AGREE]


[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]