Practical 2 & Project 1
Practical 2 & Project 1
Task 2.1 [1 mark]: Write a script to illustrate that an array in vbs can store data with multiple data types.
Optional: Although this unit uses vbs to demonstrate system administration tasks, we encourages students to try other approriate shell/script languages. Take this opportunity and discover how Python's list stores elements of different types. Remember that, Python's list just contains references to the actual objects stored somewhere in memory; this doesn't defeat the classic array structure that alloccates contiguous memory of the same data type.
Task 2.2 [1 mark]: Write a script to illustrate that all variables defined in the mainstream of a VBScript program are global, which can be changed in functions and subroutines.
Optional: Although this unit uses vbs to demonstrate system administration tasks, we encourages students to try other approriate shell/script languages. Take this opportunity and understand how Python handles local and global namespaces.
Task 2.3 [2 marks]: Take the input of three numbers from a user, using InputBox, to represent a date: Day, Month, and Year, where date input validation must be implemented.
Prompt for users to input a fourth number between 1-3. If the number is 1, then output the previously input date in the format dd/mm/yyyy. If it is 2, output the date in format mm/dd/yyyy. If it is 3, output the date in format yyyy/mm/dd.
Project 1:
This project aims to learn how to use VBScript as a website development language. To get a feeling, download the file Project1_0.html and run it in Microsoft Internet Explorer (other browsers may not work).
Then perform the following subtasks:
Subtask 1 [3 marks]: Download the file project1.html. Change the VBScript code in the file so that it can calculate total cost based on the following formula:
total cost = quantity * unit price * (1+ 10%)
Subtask 2 [3 marks]: Write an html file with embedded VBScript code to get user’s input of date of birth and output the age of the user. It's better to make it fully working with all validations including boundary data and Leap Year scenarios (e.g. DOB 29/02/2000).
Marking criteria:
This Practical and Project will be marked (10% of total marks)
Practical 2 Task 2.1-2.3 will be due in week 3 (in tutorial session, no delay is allowed).
Project 1 tasks will be due in week 4. That is, your work must be ready for checking at the
beginning of your tutorial class in Week 4 - no delay is allowed. The project MUST be submitted electronically via
the unit website by the due time [penalty for late submission applies otherwise].
For submitting your project 1, check 'Assignments', then choose 'Project 01' where you can attach files and perform submission.
A true and proper attempt must be in evidence. Students' performance regarding the task
implementation will be individually checked. Students are encouraged to present programs which are fully tested. Any program language errors,
run time errors, and logical errors will detract from the full marks. Common coding features like robustness, extensibility, and
flexibility are also taken into account for grading. No marks for the project can be obtained without demonstrating your work during
laboratory and submitting your work onto vUWS. Marks will be deducted for late submission.