41
TECHNICAL EDUCATION AND SKILLS DEVELOPMENT AUTHORITY National Assessment for PROGRAMMING NC IV (COC 1 DEVELOP OBJECT – ORIENTED APPLICATION) INSTRUCTIONS TO THE CANDIDATE

Coc1-Object Oriented Programming

Embed Size (px)

Citation preview

Page 1: Coc1-Object Oriented Programming

TECHNICAL EDUCATION AND SKILLS DEVELOPMENT AUTHORITY

National Assessment

for

PROGRAMMING NC IV(COC 1 DEVELOP OBJECT – ORIENTED APPLICATION)

INSTRUCTIONS TO THE CANDIDATE

Page 2: Coc1-Object Oriented Programming

INSTRUCTION FOR THE CANDIDATE

Qualification Programming NC IV

Certificate of Competency Title:

Develop Object Oriented Application

PART I. Designing Program Logic

A. Performance Criteria

In developing the design, the following items must be executed: Determines design approach to be taken in coding and the modules

and links required is determined Structures diagrams of program flow and modules according to project

standards Documents program scope and limits according to project standards Documents or references special routines or procedures according to

project standards Identifies and revises references for tables, files, inputs, outputs, and

other program functionalities according to program requirements Checks program flow, states or conditions for interfaces and

compliance to design documentation requirements Determines program activities and selects appropriate program

development approach Creates an initial plan to guide the program development process Uses documentation tool for program development Draws program structure and organization Defines and uses proper naming conventions Documents input and output forms accordingly Documents program flow and processes accordingly

B. Required EvidenceProgram logic design

C. Collection of Evidence

The collection of evidence for this activity will be done through analysis of the program logic design you submitted. Questioning shall be conducted to reinforce the evidence collected from this demonstration.

D. Time AllotmentYou have one (1) hour to complete the activity

ICTPRG405-0609 1Programming NC IV

Page 3: Coc1-Object Oriented Programming

E. Assessment Tasks

1. Develop and illustrate the program logic for the “Search Book Collection Facility” and “Log in Facility”.

You may use any of the following tools to demonstrate the required performances (refer to Performance Criteria for more details).

o Flow charto Data flowo Pseudo code

2. List the inputs, variables and outputs of those you will be incorporating in your design.

3. Refer to project description for the TESDA Learning Resource Center Application for more details.

PART II. Writing Program Code

A. Performance Criteria

In developing the design, the following items must be executed:

Observes basic language syntax rules and best practices Uses language data-types, operators and expressions Uses appropriate language syntax for sequence, selection and iteration

constructs Uses modular programming approach Uses arrays and arrays of objects Implements class that contains primitive member/instance variables Implements class that contains multiple options for object construction Uses class user defined aggregation Implements inheritance to at least 2 levels of depth Uses polymorphism at a simple level through inheritance to enable

easy code extension Uses an integrated development environment, particularly the

language debugging facilities Uses program debugging techniques to detect and resolve errors Follows guidelines for developing maintainable code adhering to a set

of coding standard Follows and uses internal documentation standards and tools Develops and conducts simple tests to confirm the coding process

meets design specification Documents tests performed Makes corrections to the code and the documentation as needed

ICTPRG405-0609 2Programming NC IV

Page 4: Coc1-Object Oriented Programming

B. Required EvidenceProgram code

C. Collection of Evidence

The collection of evidence for this activity will be done by analyzing and testing the program code you submitted. The more set/sub-systems you accomplished, the better your chances of demonstrating the required performances. The collected evidence shall be valid only if the program/sub-system is running according to the design specification. Questioning shall be conducted to reinforce the evidence collected from this demonstration.

D. Time AllotmentYou have five (5) hours to complete the activity

E. Assessment Tasks

1st Set 1. Indicate the language of your preference for this activity.

_______________________________.

2. Check your workstation. Your workstation will have a variety of Integrated Development Environments (IDE) for various language however if you opt to use another IDE, make arrangement with your assessor.

3. Demonstrate the required performance for this assessment activity by writing the program code for the “Search Book Collection” and “Log in” Facility (refer to Performance Criteria for more details). Make sure that you design your code as re-usable as possible for the proceeding set of activities.

4. You may use and enhance/modify the database included in this package (library.mdb) or you may create your own.

5. Run the test case scenario (Test Cases #1) using your program. Debug if needed.

6. Refer to project description for the TESDA Learning Resource Center Application for more details.

7. When you are sure that your application is running as required in the project description, call the attention of your assessor and submit your project.

ICTPRG405-0609 3Programming NC IV

Page 5: Coc1-Object Oriented Programming

2nd Set1. Make a second copy of the project from the 1st Set.2. Improve your project by writing a code for the following sub-systems:

a. Reservation facilityb. Borrow transaction facility (through reservation)c. Return facilityd. Borrow transaction facility(manual)

3. Run the test case scenario (Test Cases #2) using your program. Debug if needed.

4. Refer to project description for the TESDA Learning Resource Center Application for more details.

5. When you are sure that your application is running as required in the project description, call the attention of your assessor and submit your project.

ICTPRG405-0609 4Programming NC IV

Page 6: Coc1-Object Oriented Programming

TESDA Electronic Learning Resource Center

Test Cases #1

Case 1:Open the TESDA Electronic Library Application, the first panel that you should see is the Search and Reserve Facility. There should be forty five (45) titles from the book collection.

Case 2:Filter the book collection, set the category to “databases” then click search. The collection should be limited to twelve (12) titles.

Case 3:Filter the book collection, set the category to “databases.” In the title textbox enter “Microsoft” then click search. The collection should be limited to six (6) titles.

Case 4:Filter the book collection, set the category to “databases.” In the title textbox enter “Microsoft” and in the author textbox enter, “Lisa.” Then click search. The collection should be limited to two (2) titles.

Case 5:Filter the book collection, set the category to “databases.” In the title textbox enter “Microsoft” and in the author textbox enter, “Lisa” and in the ISBN textbox “0324785151” then click search. The collection should be limited to one (1) title.

Case 6:Filter the book collection, set the category to “All” clear all the textboxes except the ISBN textbox, enter “0324785151” then click search. The collection should be limited to one (1) title.

Case 7:1. Click log in button, the log in panel should appear in modal mode.

2. Log in to the systemUsername: adminPassword: administrator

3. Your program should generate the following output:“Sorry invalid username or password”

Page 7: Coc1-Object Oriented Programming

TESDA Electronic Learning Resource Center

Test Cases #1

Case 8:1. Click log in button, the log in panel should appear in modal mode.

2. Log in to the systemUsername: adminPassword: admin

3. Your program should generate the following output:Welcome Josephine!

4. Then the log in panel will close.

5. Once logged in, you should be redirected to administrator facilities, Borrow transaction pane to be exact. In the panel, the account information should display,”Welcome Josephine! You are logged in as administrator”.

6. Logout to the system.

7. Once logout the account information on the administrator’s panel should display, “Welcome guest!”

Case 91. Click log in button, the log in panel should appear in modal mode.

2. Log in to the systemUsername: brianPassword: b

3. Your program should generate the following output:Welcome Brian!

4. Then the system will redirect the user to the member’s panel

5. Once logged in, account information on the member’s panel should display, “Welcome Brian! You are logged in as member”. The cart panel should also become active.

6. Logout to the system.

7. Once logout the account information on the member’s’ panel should display, “Welcome guest!” The cart panel should be inactive.

Page 8: Coc1-Object Oriented Programming

TESDA Electronic Learning Resource Center

Test Cases #1

Case 10:1. Click log in button, the log in panel should appear in modal mode.

2. Log in to the systemUsername: lornaPassword: l

3. Your program should generate the following output:“Sorry your account is currently inactive. Please update your membership account before you can continue.”

4. When you close the message box, the system should automatically clear the inputs from the password.

Page 9: Coc1-Object Oriented Programming

TESDA Electronic Learning Resource Center

Test Cases #2

Case 11:1. Log in to the system

Username: brianPassword: b

2. Add the books with the following ISBN to your carta. 0826906311b. 2002102792

3. Remove the book with ISBN 2002102792 from the cart.

4. Your application should confirm the removal of the title from the list.

5. Reserve the remaining title to your account.

6. Your application should generate the output “You reserved <number of books> books in your account.”

Case 12:1. Using the same account

Username: brianPassword: b

2. Reserve the following book to your accounta. 0826906311b. 2002102792

3. Remove the book with ISBN 2002102792 from the cart.

4. Your application should confirm the removal of the title from the list.

5. Reserve the remaining title to your account.

6. Your application should generate the output “You reserved <number of books> books in your account.”

Page 10: Coc1-Object Oriented Programming

TESDA Electronic Learning Resource Center

Test Cases #2

Case 13:1. Using the same account

Username: brianPassword: b

2. Reserve the following book to your accounta. 0826906311b. 2002102792

3. Remove the book with ISBN 2002102792 from the cart.

4. Your application should confirm the removal of the title from the list.

5. Reserve the remaining title to your account.

6. Your application should generate the output “You reserved <number of books> books in your account.”

7. Log out to Brian’s account

Case 14:1. Log in to administrator’s account

Username: adminPassword: admin

2. Go to borrow transaction manual entry tab and search the book with ISBN 0766813916

3. Add the book to the cart then lend the book to Agnes with members ID 7

4. Your application should generate the output “You lend the book <book title> to <first name last name of the borrower>.”

5. Then it should generate a printable output of the transaction.

Page 11: Coc1-Object Oriented Programming

TESDA Electronic Learning Resource Center

Test Cases #2

Case 15:1. Using the same account

Username: adminPassword: admin

2. Borrow transaction reservation tab

3. Look for the member’s ID No. 2

4. Your application should display the reservation made by Brian.

5. Lend the book to Brian

6. Your application should generate the output “You lend the book <book title> to <first name last name of the borrower>.”

7. Then it should generate a printable output of the transaction.

Case 16:1. Using the same account

Username: adminPassword: admin

2. Go to return transaction

3. Look for the member’s ID No. 7

4. The system should display a book title with an ISBN 0766813916

5. Return the book

6. Your application should generate the output “<No of books returned> by <first name last name of the borrower>.”

7. Then it should generate a printable output of the transaction.

Page 12: Coc1-Object Oriented Programming

Project Description

TESDA Learning Resource Center Application

Test Project for the Develop Object Oriented Application.

© 2009 TESDA All Rights Reserved

Page 13: Coc1-Object Oriented Programming

Table of ContentsI. Overview of the Project....................................................................................................1

II. Technical Specification......................................................................................................1

A. Environment..................................................................................................................1

B. Users..............................................................................................................................1

C. Policies...........................................................................................................................2

D. Sub-systems...................................................................................................................3

E. Transactions................................................................................................................ 15

F. Database Design..........................................................................................................16

© 2009 TESDA All Rights Reserved

Page 14: Coc1-Object Oriented Programming

I. Overview of the Project

The TESDA Learning Resource Center, formerly known as Information and Documentation Services (INFODOS) is currently under the supervision of the Qualifications and Standards Office.

Its main function is to support the research and training objective of the agency by providing resources and information.

Currently, it is serving policy makers, school administrators, trainers, teachers, curriculum developers, students, workers, employers and others. The number of clients served by the center has doubled yearly from its first year of operation. It started with an average of twenty (20) clients per day. Now after 5 years of operation, it is serving an average of eighty (80) clients per day.

The center is currently operating using manual recording of transaction method which results in poor services and operations for its clients. As a solution, the management decided to commission programmers to design an automated system for the center that will be used for the next five (5) years of operation.

II. Technical Specifications

A. EnvironmentThe application to be developed should be a stand-alone desktop

application and in graphical user interface (GUI) mode.

B. UsersThe system shall have following users:

1. AdministratorAdministrator is the custodian or manager of the center. The tasks of

the administrator are:

a. Add, delete or modify titles from the book collectionb. Add, suspend, activate or revoke membershipc. Acknowledge borrowed and returned booksd. Cancel reservatione. Prepare transaction reports for borrowed and returned booksf. Prepare daily collection report for overdue feeg. Prepare inventory reports

2. MemberMember is a registered user. The privileges of a member are:a. He/she can view the book collection of the centerb. He/she can make reservation in borrowing books (books for pick-up)c. He/she can borrow books from the center

© 2009 TESDA All Rights Reserved

Page|1

Page 15: Coc1-Object Oriented Programming

3. GuestsGuests are non-registered clients of the center. They can view or

search the book collection of the center; however they cannot borrow a book.

C. PoliciesThe system will be operating under following policies:

1. Reservation Policy

a. Only active members can make the reservation of the titleb. Maximum of three books can be reserved by particular member, unless

otherwise a new policy for allowable number of books to be borrowed is approved.

c. Reservation is valid only for twenty-four (24) hours, unless otherwise a new policy on validity of reservation is approved.

2. Borrowing Policy

a. Only active members can borrow books.b. One day/Overnight borrow policy. In case of overdue a fine of twenty pesos per

day (Php 20.00/day) will be charged, unless otherwise a new policy on overdue fee is approved.

c. Members who lost books shall be fined with exact cost of the book.d. Books can be borrowed only if stocks are available (reserved books are

considered borrowed unless the reservation has expired)e. Number of books that can be borrowed by a particular member should be the

same as the set maximum number of books allowed in the reservation.

3. Membership Policy

a. All members are required to register (see registration form for more details)b. Each member will be provided with unique identification numberc. Membership will expire one year from the date of registration unless otherwise

new membership policy is approved.d. Renewal of membership is allowed. The member who will be availing this

privilege will retain their original identification number. e. Members are inactive when their membership are expired or revoked.

© 2009 TESDA All Rights Reserved

Page|2

Page 16: Coc1-Object Oriented Programming

D. Sub-systems1. Search Book Collection Facility

a. Main Features

This facility should have the following main features:

Interface that allows user to browse through the book collection and display the following information:

o Title of booko ISBNo Authoro Abstracto Book Availability (Available/Not Available)

Interface that filter the collection according to:o Categoryo Titleo Authoro ISBN

b. InterfaceThe illustration below is the prescribed layout for the project.

© 2009 TESDA All Rights Reserved

Page|3

1

2

3

4

56

Abstract

Page 17: Coc1-Object Oriented Programming

c. Description

This interface is the first panel you will see when the electronic library is opened. This allows guest (not logged in user) to browse through the book collection.

Book information panel (1) – This shows detailed information about a particular book in the collection.

Navigation button (2) - There should be a navigation control that allows user to browse through the collection.

Filter panel (3) – This input interface allows user to narrow down the book collection by providing the specific book category and key words from the book title and author. When ISBN entry has been provided, the search filter will focus only on the ISBN entry.

Button (4) – This button is inactive while the user is not logged into the system. Details of this button are described under the reservation facility.

Log in button (5) – This is the button that calls the log in interface of the system.

“Search and Reserve” and Transaction Tab Control (6) –This allows user to switch between the two panels however the transaction panel is not yet enabled at this stage.

2. Log in Facility

a. FeaturesThis facility should have the following features:

The interface should accept only the following inputs:o Usernameo Passwordo Execute commando Cancel command

The interface should automatically detect the following based on the username and password submitted:

o Validation of usero Role of the usero Validity of account (active in active)

The interface should automatically filter the following

o Invalid username and passwordo Inactive account

© 2009 TESDA All Rights Reserved

Page|4

Page 18: Coc1-Object Oriented Programming

b. InterfaceThe illustrations below are the prescribed layout for the project.

© 2009 TESDA All Rights Reserved

Page|5

1

2

3

4

5

Abstract

Abstract

Page 19: Coc1-Object Oriented Programming

c. Description

Log in/Log out button (1) – Initially the text in this button indicates “Log in”. This is used to call and show the log in panel. Once the user successfully logged in to the system, the text in this button will indicate log out. This button is now used to log out a user to the system.

Log in panel (2) – This interface is where the user inputs the user account and executes the user validation process of the system (checking of authenticity of the user account and validity of membership). After the process it should render the following output:

o Message box indicating the message “Welcome <first name of the user>” for valid user account

o Message box indicating the message “Sorry invalid username or password” for invalid account entry.

o Message box indicating “Sorry your account is currently inactive. Please update your membership account before you can continue.”

Account information (3) – This indicates the first name and role of the logged user. It displays “Welcome Guest” with no user role if the current user has not logged into the system.

Members Panel (4) – This is the same form with the guest panel. The difference is that there are elements of the form that is active once the member logs in.

Administrator Panel (5) – This form is called and displayed when an administrator logs into the system. Elements of this panel is described under the borrow transaction facility.

3. Reservation Facility

a. Features

This facility is available only for members. It should have the following features:

The interface is active only when the member is logged into the system. Derives the book to be borrowed from the search facility and stores the

information into an electronic cart. Books included into the cart can be deleted from the list Automatic feedback indicating the number of books reserved through

message box. Limit automatically the number of books that can be reserved by the

user.

© 2009 TESDA All Rights Reserved

Page|6

Page 20: Coc1-Object Oriented Programming

b. InterfaceThe illustration below is the prescribed layout for the project.

c. Description

Add to cart button (1) – Active only when a member logs in to the system. This control is used to add the current book in the book information panel to the cart panel.

Cart panel (2) – This control is active only once the member logs into the system. This interface holds the list of the books selected from the collection.

Remove selected book button (3) – This control removes the selected book from the cart.

Reserve listed book button (4) – This control adds the books from the cart into the system database as reserved to the current member. Once a reservation has been made, the system will feedback “You reserved <number of books> books in your account.”

© 2009 TESDA All Rights Reserved

Page|7

1

2 3

4

Abstract

Page 21: Coc1-Object Oriented Programming

4. Borrowing Transaction Facility (Through Reservation)

a. Features

The system should have an interface that allows searching of users that made book reservation via entry of member’s ID number.

Books from the reserved list can be removed.

Allows transfer of books from the reservation record into the borrow record.

Monitor the number of the borrowed book by the member.

Provide automatic feedback of the following:

o The member exceeds the allowable number of books that can be borrowed.

o Printable report on the transaction made.

b. InterfaceThe illustrations below are the prescribed layout for the project.

© 2009 TESDA All Rights Reserved

Page|8

12

3

Page 22: Coc1-Object Oriented Programming

c. Description

Borrow Transaction Tab (1) – Activate the panel for managing the borrow transaction.

From Reservation Tab (2) – Activate the panel for searching reservation transaction record via entry of member’s ID number.

List of reserved books (3) – This control displays the books reserved by the owner of the ID number. Books listed from here can be deleted or transferred to the borrow records.

Generated printable report (4) – This report is generated once the “Lend listed item” button is clicked. This serves as proof that a borrow transaction has undertaken. Information indicated here are the following:

o Date borrowed

o Due date

o Transaction number

o List of books borrowed

o Name of member

o Member’s ID number

© 2009 TESDA All Rights Reserved

Page|9

4

Page 23: Coc1-Object Oriented Programming

5. Borrowing Transaction Facility (Manual Mode)

a. Features

This facility is similar with the search reservation facility. The differences are the following:

This panel belongs to administrator’s facilities while the reserve facility belongs to member’s facility.

Instead of adding the listed book to the reservation records, it is added directly to the borrow facility.

It generates feedback such as:

o Confirmation of member’s ID number

o The member exceeds the allowable number of books that can be borrowed.

o Printable report on the transaction made.

b. InterfaceThe illustrations below are the prescribed layout for the project.

© 2009 TESDA All Rights Reserved

Page|10

1

2

Page 24: Coc1-Object Oriented Programming

c. Description

Add to cart button (1) – add the current book in the book information panel to the cart panel.

Lend listed books (2) – transfer the listed books to the borrow records. Member’s ID confirmation box (3) – this panel asks the user of the ID

number of the borrower. Generated printable report (4) – This report is generated as proof that a

borrow transaction has undertaken.6. Return Facility

a. Features

This facility allows the administrator manage the book return transaction. It should have the following features:

The panel should have a search interface that can be used in looking for the record of the member returning the book.

There should be an interface that provides option for return transaction such as:

o Return onlyo Pay overdue penalty onlyo Pay overdue penalty and return

The system should generate report of the transaction made

Automatically computes the individual book overdue and total overdue collectibles per transaction.

© 2009 TESDA All Rights Reserved

Page|11

3

Page 25: Coc1-Object Oriented Programming

b. InterfaceThe illustrations below are the prescribed layout for the project.

© 2009 TESDA All Rights Reserved

Page|12

1

2

3

4 5

6

Page 26: Coc1-Object Oriented Programming

c. Description

Return transaction tab (1) – This control activates the return transaction panel.

Search member’s record interface (2) – This control can be used in looking for borrow and return transaction record of the member via entry of ID number.

List of borrow and return transaction record(3) – This control displays the record of returned books with the following status:

o Returned book with unpaid penalty

o Unreturned books with overdue penalty

o Unreturned books without overdue penalty

Return option (4) – Allows user to set the type of transaction:

o Return only

o Pay overdue only

o Return and pay overdue

Add selected item (5) – Calls and shows the return transaction panel. Every time this button is clicked, the selected item from the list of transaction record is added to the return transaction list.

Return transaction list (6) - Displays the list of books to be returned/paid. When process button is clicked returned items with no zero penalty will be marked Status-OK. This will remove the item from the record of return transaction.

© 2009 TESDA All Rights Reserved

Page|13

7

Page 27: Coc1-Object Oriented Programming

Generated printable transaction report (7) – Upon clicking the process button, the system will generate a printable output of the return transaction.

7. Member Transaction Recording Facility

a. Features

This panel displays the unsettled personal transaction of the member as reminder of their obligations.

b. Interface

c. Description

Transaction record tab (1) – This control is active only if the member log’s into the system. It is used to display the personal transaction record of the member.

List of transaction record(2) - This control displays the list of unsettled transactions such as:

o Unreturned books without penalty

o Unreturned books with penalty

o Returned book with unsettled penalty.

© 2009 TESDA All Rights Reserved

Page|14

1

2

Page 28: Coc1-Object Oriented Programming

8. Collection MaintenanceThe maintenance facility of the book collection is not included in this project.

9. User MaintenanceThe maintenance facility for user is not included in this project.

E. Transactionsa. Borrowing

The administrator will register the books borrowed by the member. There are two ways of registering the books to be borrowed: (1) through manual entry of ISBN; (2) through the reservation records of the member. The maximum number of books that can be borrowed in one transaction is based on the borrowing policy. The system should record the name of borrower, the books borrowed, ISBN, transaction number and the date borrowed.

b. Returning

The administrator needs to acknowledge the return of the books. Books from single borrowing transaction can be returned on individual returning transaction. The system should record the name of borrower, the borrowing transaction number, title of book, date the book returned and status of return transaction.Status of return transaction can be:

o Return the book without penalty (Status OK)

o Return the book with unsettled penalty

o Unreturned book without penalty

o Unreturned book with penalty

c. Reservation

The member can reserve the title of the book to be borrowed. The reservation policy should be strictly followed in this function. The system should record the name of borrower, the books borrowed, ISBN, transaction number and the date reserved

© 2009 TESDA All Rights Reserved

Page|15

Page 29: Coc1-Object Oriented Programming

F. Database DesignBelow is the proposed database design for the system

© 2009 TESDA All Rights Reserved

Page|16