You are on page 1of 8

Unit:

Introduction to Programming
Assignment title:
Search and sort
Summer 2024
Important notes
• Please refer to the Assignment Presentation Requirements for advice on how
to set out your assignment. These can be found on the NCC Education
website. Hover over ‘About Us’ on the main menu and then navigate to
‘Policies and Procedures’ then scroll to the ‘Student Support’ area.
• You must read the NCC Education document Academic Misconduct Policy
and ensure that you acknowledge all the sources that you use in your work.
These documents are available on the NCC Education website. Hover over
‘About Us’ on the main menu and then navigate to ‘Policies and Procedures’
then scroll to the ‘Student Support’ area.
• You must complete the Statement and Confirmation of Own Work. The form
is available on the NCC Education website. Hover over ‘About Us’ on the
main menu and then navigate to ‘Policies and Procedures’ then scroll to the
‘Student Support’ area.
• Please note, word count is not applicable on this assignment as the
artefact to be produced is a programming code (with a word document
containing screenshots of the results, a filled-out object definition
sheet and a test log)
• You must submit a paper copy and digital copy (on disk or similarly
acceptable medium). Media containing viruses, or media that cannot be run
directly, will result in a fail grade being awarded for this assessment.
• All electronic media will be checked for plagiarism.
Background information

Complete the following computer programming tasks using Visual Basic.

For each task, you must test the programming code you create.

The evidence you must produce is a working VB program and a Word document
containing the following:

• Screenshots of the user interface


• Pseudocode
• Completed Object Definition Sheet
• The Visual Basic program code, with relevant comments (i.e., annotated)
• Testing strategy that identifies the parts of the system to be tested and the type of tests
to be performed. This should also include run-throughs of part of the system and the whole
system
• Completed Test Log
• Screenshots of the output generated when the program code is run
• Evaluation of the system including comparison to requirements.

It would be a good idea to use the Windows Snipping tool to assemble this Word
document.

You do not have to provide any general commentary on your work in a separate word-
processed document, but you do have to provide short comments on the code to explain
what each function or segment of code does.

You do not have to provide any history of what debugging you may have done.

It is very important that the program code is clear, the outputs are designed to be
easy to understand and your Word document is well presented.

Page 6 of 7
Introduction to Programming © NCC Education Limited 2024
Introduction

This assessment is worth 100% of your overall grade.

Scenario

A program needs to be written that demonstrates how different searching and sorting
algorithms work.

The user can select to view either:


• a bubble sort.
• an insertion sort.
• a linear search
• a binary search

The program will need to:


• allow the user to provide the searching or sorting algorithm they want to view.
• allow the user to either select a random set of TEN (10) integer values (between 0
and 20 inclusive) to search or sort or import TEN (10) integer values from an
external text file to search or sort.
• allow the user to input an integer to search for if a searching algorithm is selected.
• show how the searching or sorting method works by outputting the values at each
step of the process.
• output the position of the data if it is found, or if it is not found if the user selects a
search algorithm.
• allow the user to return to the main menu to select another set of data.

The program needs to be able to handle two numbers that are the same.

An example of the output for a bubble sort is:


Before: 10 5 3 1 2 6 4 5 7
Step 1: 5 10 3 1 2 6 4 5 7
Step 2: 5 3 10 1 2 6 4 5 7
etc.
Step X: 1 2 3 4 5 5 6 7 10

Hints on design and implementation

• Plan your program before starting. You will need to think about how the user will
make their choices.
• You will need to consider how you are going to decide and output each step of the
process of searching and sorting.
• You will need to consider how to make the system robust against invalid data, for
example when the user inputs TEN (10) non-integer values.

Page 6 of 7
Introduction to Programming © NCC Education Limited 2024
Total – 100 Marks

Task 1 Form/interface design – 10 marks


Design your user interface for ONE (1) or more VB forms:

• to allow the user to select the searching or sorting algorithm they want to use.
• to allow the user to select either a random set of data (TEN (10) integers between 0
and 20 inclusive) or to import the data from an external text file.
• to display each step of the algorithm
• to display either the index of the data when found or displaying a message that the
data is not found when a searching algorithm is selected.

Task 2 Pseudocode and Object Definition Sheet – 28 marks


• Write pseudocode to design the input of the choices the user has to make, including
the importing of data from a text file if required.
• Write pseudocode to design each sorting method and to display the process one
step at a time.
• Write pseudocode to design each searching method, to accept the data to search
for as input, and to display each step of the process and the result as to whether
the data is found.
• Produce an Object Definition Sheet for the full program (see attached template).

Task 3 Implementation – Main program – 37 marks


• Create the form to allow the user to select the searching or sorting method.
• Create the form to allow the user to select a random set of numbers or to import the
data from a text file.
• Create the form to show each step of the process for the chosen algorithm.
• Write the code to validate any data that is input, including choices made and the
numbers input.
• Write the code to import the data from an external text file if required.
• Write the code for each sorting method and display each step of the process.
• Write the code for each searching method, to display each step of the process and
whether the data was found and if found display the index.

Page 6 of 7
Introduction to Programming © NCC Education Limited 2024
Task 4 Testing and evaluation

a) Test strategy – 6 marks


• Design a testing strategy and complete a Test Log (see attached template) for each
of the choices the user can make including a range of data or inputs.

b) Testing – 12 marks

• Complete the testing by documenting it in the Test Log and screenshots of tests
provided as evidence of testing.
• Make sure you test all of the different algorithms with a range of different data; for
example, searching for the smallest number in the list, searching for the largest
number in the list, searching for data that is not in the list, searching for the first
number in the list and searching for the last number in the list.
• Make sure you test the validation rules so that the program is robust.

c) Evaluation – 7 marks

• Evaluate your program by comparing it to the requirements.


• Identify improvements to the system
• Identify the positive features of the system.

Mark distribution

• Design – Tasks 1 and 2 (38 marks)


• Implementation (37 marks)
• Testing and evaluation (25 marks)

Guidance

The assessment of your project will depend in part upon the quality of the documentation
that you have produced.

• Restate the specification of the assignment by listing the required outcomes.


• Take the time required to design the assignment before you type any program
code. Follow an appropriate design and documentation sequence.
• Always document your designs before you implement them.
• Keep the Object Definition Sheets up-to-date and do basic tests at each stage of
the development.
• Provide a detailed design including, where appropriate, the design of any
algorithms.
• Build in error handling to involve meaningful messages that would help with any
future maintenance of the software.
• Annotate all implementations.
Page 6 of 7
Introduction to Programming © NCC Education Limited 2024
• Design a testing strategy.
• Justify the design of suitable comprehensive test data.
• Show evidence of testing.
• Where appropriate, detail any major corrective action that you have taken in the
light of the testing process.

Submission requirements

A word-processed document must be submitted incorporating the full documentation of all


the significant aspects of the development of the assignment above. The document should
be submitted both in paper form and digital form.

Refer to the Guidance above when producing your final documentation.

You are required to submit a publishable copy of the compiled system together with
installation notes.

This publishable copy, which includes a setup file, should be on an appropriate medium
(CD, USB flash drive, etc.).

Candidate checklist

Please use the following checklist to ensure that your work is ready for submission.

Have you read the NCC Education document Academic Misconduct


Policy and ensured that you have acknowledged all the sources that ❑
you have used in your work?
Have you completed the Statement and Confirmation of Own Work
form and attached it to your assignment? You must do this. ❑
Have you ensured that your work does not contain viruses and can
be run directly? ❑

Page 6 of 7
Introduction to Programming © NCC Education Limited 2024
Object Definition Sheet
Non-default properties at design time
Event procedures that have to be written
No. Type Property Value Event procedure

Page 6 of 7
Introduction to Programming © NCC Education Limited 2024
Test Log Template

Test Test Input Expected Actual Pass/Fail


Number Purpose Output Output

Page 6 of 7
Introduction to Programming © NCC Education Limited 2024

You might also like