Computer Science homework help
Rapid Application Development – Assessment Task 1 LAST UPDATED: December 2015, Version No. 7.0
Page 1 of 4
T. +61 2 9283 4388 | E. info@wic.nsw.edu.au Lower Ground, 101 Sussex St., Sydney NSW 2000 Australia | www.wic.nsw.edu.au
ABN: 19 080 559 600 | CRICOS CODE: 01856K | RTO: 90501
Assessment 1- Computer Based Activities
Instructions
1) This is an in-class closed book written assessment. Answer all the questions on the paper provided by your Trainer.
Duration:
Trainer will set the duration of the assessment.
Rapid Application Development – Assessment Task 1 LAST UPDATED: December 2015, Version No. 7.0
Page 2 of 4
T. +61 2 9283 4388 | E. info@wic.nsw.edu.au Lower Ground, 101 Sussex St., Sydney NSW 2000 Australia | www.wic.nsw.edu.au
ABN: 19 080 559 600 | CRICOS CODE: 01856K | RTO: 90501
Capture Business Rules
Functional requirements define what the system should do, business rules help define what needs to be done and how it is done.
Following is an example of Business rules for a library system
Business rules about borrowing
General borrowing rules:
There is no maximum number of books that can be borrowed
Books must be returned within 4 weeks
Borrowers can borrow a maximum of 4 videos
Videos must be returned within 2 weeks
Borrowers can borrow a maximum of 4 CDs
CDs must be returned within 2 weeks
Borrowers are unable to borrow items if there are items overdue on the borrower’s account
Borrowers are invoiced for items that have not been returned
When an item is loaned the following information is recorded:
Borrowers ID
Item ID
Date borrowed
Return due date
The item is flagged as borrowed
When an item is returned the following information is updated:
The item is flagged as returned
Business rules about customer applications for a borrower’s account
To become a borrower, customers must supply the following details:
Name
Address
Phone number
Age
(Email address) – optional
Each borrower has a unique identifier (ID)
Business rules about loan items
When new loan items are received at the library, the following details are recorded about each item:
Unique identifier (ID)
Title
Author
Subject category
Media type
Rapid Application Development – Assessment Task 1 LAST UPDATED: December 2015, Version No. 7.0
Page 3 of 4
T. +61 2 9283 4388 | E. info@wic.nsw.edu.au Lower Ground, 101 Sussex St., Sydney NSW 2000 Australia | www.wic.nsw.edu.au
ABN: 19 080 559 600 | CRICOS CODE: 01856K | RTO: 90501
There are media types – Books, Videos, CD – for each of these media types we keep additional information
Your tasks:
Task 1 – Capture Business Rules
To represent business rules diagrammatically:
Draw a Context Diagram showing basic business process and entities. (Structured modelling)
Draw a Use Case Diagram showing all the actors and use cases. (Object oriented modelling)
Task 2 – Temperature Conversion
Write a program to convert Celsius Degree to Fahrenheit Degree, we declare c and f, and use these as follows:
double c; // Celsius degree
double f; // Fahrenheit degree
Temperature conversion formula as follows:
? = ? × 9
5 + 32
Task 3 – Class
Design a class name Circle to represent a circle. The class contains:
Radius as data field
Default constructor that create a circle with 1 unit radius
A constructor that create a circle with specific radius
The accessor(get) and mutator(set) functions for all the data field.
A function named getDiameter() that returns diameter of the circle
A function named getCircumference() that return circumference of the circle
Task 4 – Array
Write two overloaded functions that return the average of an array with the following headers:
int average(int array[], int size);
int average(double array[], int size);
Use {1, 2, 3, 4, 5, 6, 7, 8, 9} and {1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5, 8.5, 9.5} to test the functions.
Task 5 – Binary search
From Task 3, create a function named binarySearch(int x) perform a binary search algorithm.
Task 6 – GUI
Create a C++ GUI Form, ask for 1 integer then perform a binary search in sample array from Task 4. The result displays on screen are a number of comparison and search result (Return item position if found, return -1 if not found)
Task 7 – Debugging
Rapid Application Development – Assessment Task 1 LAST UPDATED: December 2015, Version No. 7.0
Page 4 of 4
T. +61 2 9283 4388 | E. info@wic.nsw.edu.au Lower Ground, 101 Sussex St., Sydney NSW 2000 Australia | www.wic.nsw.edu.au
ABN: 19 080 559 600 | CRICOS CODE: 01856K | RTO: 90501
Use the code from Task 6, perform debugging, steps as following:
Add 2 break points in binarySearch function
Capture screen that show current variable value
Task 8 – Testing and Documenting
Once you have completed the development of the application, you need to test the application against the specification before handing over to your trainer. You also have to develop a user manual template on how to use a binary search software.
Task 9 – RAD tools
Write an essay (not more than 300 words) on the “Design Creeps” with this iterative design process using the RAD tool (PhormGen)