HTML辅导 | Prac 9 Instructions #eng1003/week9

#eng1003/week9

The objectives of this prac class are to:

This prac class involves the following parts.

Your demonstrator will visit your team during the first hour of the prac class and have a stand-up meeting with your team. The stand-up will discuss the progress on the assignment and last at most 5 minutes. Each team member should speak briefly (for at most 1 minute), addressing the following three questions:

The purpose of this meeting is for the team and your demonstrator to gain a clearer view of assignment progress and understand what everyone is doing.

Together with your team you will write a thorough set of black box acceptance tests and then discuss your experience from the testing exercise.

In this activity you are testing a JavaScript function that parses names and turns them into a structured name object consisting of a prefix, suffix, first, middle and last names. You are required to read and understand the informal requirements for this function, given below. You will then write a set of acceptance tests to confirm whether the code works as expected. You are provided with a testing harness which calls the function for each test case and reports the results.

You should start by preparing a table such as the one below and creating a set of test cases based on the specifications of the function given.

Youmustdocument your reason for each test case.

You will run test cases by working with the following code in the JavaScript Playground . You should start by copying and pasting this code into the Playground. This code reads and executes each test defined in the tests array. You should replace/extend this array with your own tests.

Your team should discuss your findings from the testing. You should consider whether the function satisfies the specification, as well as reflecting on your experience of writing black box acceptance tests in the exercise.

parseName function

These properties will all be strings, although they may be an empty string if the person’s name doesn’t include this. Periods and commas are treated as formatting and are removed. All words in the output strings will have the same capitalisation as in the original input name string.

This function checks for common prefixes at the beginning of the given name string. The prefixes it recognises are “prof”, “mr”, “mrs”, “ms”, “dr”, “miss”, “sir”, “madam”, and “hon”. These are recognised regardless of capitalisation and regardless of whether they have a period ending the abbreviation, e.g., “Prof.”.

Common suffixes are checked for are the end of the name string. The recognised suffixes are “jr”, “sr”, “i”, “ii”, “iii”, “iv”, and “v”. Again these are recognised regardless of capitalisation.

The usual form of recognised names is [PREFIX] FIRST [MIDDLE]+] [LAST[, SUFFIX] where things in square brackets are optional, i.e., with the prefix and suffix subtracted, if there is just one word this will be recognised as the first name. If there is two the second will be recognised as the last name. Any additional names in the middle will be recognised as middle names. One exception to this is if there is a valid prefix and only one name, then this is recognised as the last name, e.g., “Mrs Smith” will be assumed to contain a prefix and a last name.

A reversed form of name is also recognised: LAST, [PREFIX] FIRST [[[MIDDLE]+][, SUFFIX]. For example, “Wybrow, Dr. Michael”

This activity is to be done as a team. It requires you to critically evaluate the interface of a mobile app with respect to the principles suggested by Norman and Shneiderman in this week’s pre-workshop Alexandria material.

In the final hour of the practical class, we will be spending some time implementing an MDL prototype for the app.

You should work as a team in pairs (using pair programming) to implement an MDL prototype for your app, based on your wireframe and storyboard designs from the previous week. You are welcome to modify the wireframe and/or the storyboard if necessary. You should use mocked up data where needed in order to show how the elements will look like. You should not write any JavaScript code at this time.

Your team will be assessed for this checkpoint (worth 1%) towards the end of class (~:40).

At this point, your demonstrator will also come to have a chat with you about the features that you will have to implement by the checkpoints in Week 10 and Week 11 (worth 0.5% each).