The University of Queensland Homepage
School of ITEE ITEE Main Website

 INFS3204 Practical 2

Practical guidelines:

Just to iterate:
  • Pracs are designed to introduce you to common programming concepts taught in this course.
  • Each prac consists of any number of tasks, which may be assessed for marks when completed.
  • Read the instructions given in the prac to see what should be the desired results. Sometimes hints may be given to guide you through the task, but for most of the time you're encouraged to research how to solve the problems yourself!
  • Additional exercises will not be marked, but the tutor will provide help and check these exercises.
  • Don't hesitate to ask the tutor if you need help.
In this prac, we will be creating multiple web services. Composite web applications are built by combining multiple components, such as web services and other smaller or legacy applications.

There are 3 marks for this prac, allocated as follows:

  1. 1 mark for completing task 1.
  2. 2 marks for completing task 2.
This prac is due in Week 6!

Next week's prac will require a database account, so check now if your account is set up.


Task 1: The Web Services Calculator

Objectives:
  • Creating an ASP.NET web application that utilizes multiple web services
  • Using ASP.NET validators for simple data validation
Mark: 1
Instructions: Follow the Flash video embedded below. It will no longer explain trivial actions, for example adding Web References, so go back to Prac 1, and complete the additional exercises if you'd like to refresh your memory.




Task 2: Postcode Validation I

Marks: 2

Instructions: This task requires you to create a webservice that checks if the postcode entered is valid according to the selected state or territory. The postcode ranges for each of the states and territories are listed in the table below.

State/Territory Postcode Range
NSW 2000-2599
2619-2898
2921-2999
ACT 2600-2618
2900-2920
VIC 3000-3999
QLD 4000-4999
SA 5000-5799
WA 6000-6797
TAS 7000-7799
NT 0800-0899

Requirements:

  • A web form including a drop down menu listing each of the Australian states and territories listed above, a text input field and a submit button.
  • The user will select their state from the drop down menu.
  • The user will then enter their postcode into the text input field. If the postcode entered doesn't match the postcode range for the selected state/territory an error will be displayed to the screen.
  • Use a new web service for each state/territory. You will not receieve full marks if you use one giant 'if' or 'switch' statement.

That's it for Practical 2!


Additional Exercises

Additional Task 1: Postcode Validation II

Instructions: This task is an extension of Postcode Validation I. Using the same web interface as previously created, the web services should modified be able to correctly validate postcodes for LVRs, PO Boxes and postcode exceptions. These exceptions can be found here.

Remember to check if there has been text entered in the input field before the webservices are invoked.



Additional Task 2: Strings

Instructions: For this task, you will need to create four web services which will display modified text entered into a text input field.
  • The web form requires a submit button, a text input field and three label fields.
  • The user will firstly be required to enter a word into the text input field.
  • By clicking the button a web service named modifyString() will be take the entered text and pass it to three other web services.
  • The second web service stringToUpperCase() will turn the string into capitials and display this in the first label.
  • The third web service stringToLowerCase() will turn the inputed string into lowercase and display this in the second label.
  • The fourth web service addFives() will insert 5 after every character. The output will be displayed in the final label.

Remember to check if there has been text entered in the input field before the webservices are invoked.