The University of the South Pacific

The University of the South Pacific
School of Computing, Information & Mathematical Sciences
CS111: Introduction to Computing Science
Assignment 1
Learning Outcome:
1. Define the basic functional components of a computer system, operation and interconnection (3%)
2. Apply programming concepts to computing problems (7%)
Weight: 10%
Due Date: 15th March, 2019.
Part 1: Programming – Fiji Immigration Visa Assessor Program
1.1 Problem Statement
Design and implement a C++ program that asks user for their:
A. Name (First & Surname);
B. Gender (M/F);
C. Age;
D. Employment Status;
E. Salary (if employed) , Marital Status,
F. Citizenship.
G. Type of Visa applied for
H. Duration of Visa
And then decide the outcome of the visa application (Granted or not granted). The decision of
the visa granting process is described below.
1.2 Program Specifications:
1. Prompt the user to enter the required information, A-H above
2. All input should be validated wherever necessary. For instance, the input for age has to
be only in integers.
3. Calculate the annual income and the associated tax and display in a presentable
manner in dollars.
1.3 Visa Grant Process
The granting of visa is depend on various parameters. Firstly, we need to figure out the type of
visa applied for. In this scenario, there are four different types of Visa that any person can apply
for, Student Visa, Tourist Visa, Business Visa and Permanent Residency Visa. The user of the
program should be able to apply for any one of these visas however, there are different
requirements for each type of visa.
Note: A visa application is only required if the applicant not a Fiji citizen.

Visa Type Visa Conditions
Student Visa 1. The applicant must be below the age of 45 and above the age of
18 years old
2. The duration of the visa cannot exceed 36 months
Tourist Visa 1. The applicant must be employed.
2. Applicants Salary has to be more than 20,000 FJD
3. The duration of the Visa should be less than 3 months
Business Visa 1. The applicant must be employed
2. Applicants Salary has to be more than 20,000 FJD
3. The duration of the Visa should be less than 1 months
Permanent
Residence Visa
1. The applicant must be employed
2. Applicants Salary has to be more than 40,000 FJD if the user is
single. For married applicants, they salary should be more than
80,000FJD
AssignmentTutorOnline

Your program should be able to ask the user for the various inputs and make a decision on the
grant of Visa. Successful applicants are notified with a successful Visa Grant Message.
Unsuccessful applicants must be given the reason as to why their Visa application was denied
along with a Unsuccessful Visa Grant Message.
Note:

In all your program constructs you must write comments where necessary. Don’t write
comments for obvious code, but segments of code which seem complex. Also include
your name, student id# and tutorial group as comments at the top of your program code.
No need to use functions as it has not been yet covered in the course.
All input should be validated wherever necessary. For instance, the input for age has to
be only in integers.

Partial Credit:
Even if your program does not work perfectly, you will receive partial credit for each part you get
to work. For example, if your program compiles but gives incorrect results, you can still receive
a mark provided that your code is well-written.
Part 2: Report
Write a report that will answer the questions given in Section 2.1 and Section 2.2.
Your report should include a cover page with the relevant information such as course details.
You must include your name and student id number on the cover sheet.
Both these questions should be answered in the same report. You do not need to create two
separate reports for the two questions.
2.1 Hardware and software fundamentals (10 Marks)
The functioning of modern computers are extremely complex. The speeds at which modern
computers work are exemplary. However, the fundamentals behind the running of these
machines are simple.
Using the above statement as reference, briefly describe how a modern computer functions.
You must discuss the major components needed in the functioning of these marvelous
machines.
Please answer in less than 300 words.
2.2 Societal Issues/Legal issues/Privacy (10 Marks)
As the programmer of the Fiji Immigration Visa Accessor Program, you have the opportunity to
make a program that will allow all of your friends to be granted any type of Visa they apply for.
Would this be ethical to do? Would this be in line with the ACS Code of Ethics and with basic
Programming Ethics? Explain.
Please answer in less than 300 words
Part 3: Assignment Rules and Submission Instruction
3.1 Assignment Workload.
This is an individual assignment. You are expected to work on your assignment alone however,
you are welcome to discuss your ideas with your colleagues and tutors.
3.2 Submit before the Deadline
You have to submit your work before the deadline 15th March 2019, 11:55pm. Lab computers
are scarce, so the trick is to start EARLY. Also when you finish don’t hold on to your assignment
till the last moment. Submit as soon as you are satisfied with it.
3.2.1 Submitting late:
If you think that you will not be able to submit the assignment on time due to circumstances
which are beyond your control, then you will need to seek approval from the course coordinator
prior to the due date.
This means you have to ask for an extension, explaining the reasons, before the deadline, and
not after. A late submission will be penalized by 20% for each 24 hour period it is late. Where
possible, it is better to hand in your work early and get credit for partial work than handing in
late. A partial work may earn more points than a working assignment which is submitted late.
3.3 Submission
You will have to submit exactly two files on Moodle.
1. A write-up answering the questions in Section 2.1 and 2.2
2. A program for Section 1.
3.3.1 Program
Be sure you submit .cpp files only. Name your program file as Assign1_YourIdNumber.cpp,
where YourIdNumber is your student id number (e.g. Assign1_S01234561.cpp).
Do not submit the .exe executable versions of your program. Also be sure that you submit the
assignment only once you are totally satisfied. We will not accept “corrected versions” submitted
through other channels after the due date. However, you can submit the assignment as many
times as you like on Moodle before the due date!
3.3.2 Write-up
Your write-up will have to be written in English. Try to keep your answers short and clear.
Excessively verbose answers will be penalized.
Upload your write-up as a single document. The preferred format is a PDF file. Word documents
are good for editing, but you should export or save the final version as PDF. This is the format
for reading.
3.4 Plagiarism
For this and other work in CS111, it is essential that you avoid plagiarism. Not only do you
expose yourself to possibly serious disciplinary consequences, but you will also cheat yourself
of a proper understanding of the concepts emphasized in the project. You will almost certainly
fail the short tests and/or the final which will test your understanding of the project. It is not
plagiarism to discuss the assignment with your friends and consider solutions to the problems
together. However, it is plagiarism for you to copy all or part of each other’s programs. If you
find somebody has stolen your assignment and produced it as their own, it will be considered
plagiarism. We are using automated tools to assist with the detection of plagiarism.
They will highlight any unusual code that is similar between students. All cases that are flagged
as potential plagiarism will be checked by hand. So do not leave your flash drives around. Be
careful with them. And make sure you log out of the lab machines when you are finished
working with them. Don’t copy part of someone solutions, and do not give somebody else an
electronic copy of your solution. If you give someone your program it is almost guaranteed that
part of it will end up in their program, no matter whether you ask them not to copy.
Any student posting code for this project on Moodle will be considered to be committing
plagiarism. Do not submit your code to any discussion group or mail it to anyone except the
lecturers or tutors.
Do not be concerned if Moodle tells you that a file cannot be checked by TurnItIn for plagiarism.
This will be your program file. We will check programs separately once submitted.
3.5 Support
If you have a problem with the assignment, with C++, Dev C++, the exercises, and questions in
this assignment, lecture notes, the book, please ask. First use the forum for your questions. This
will also help other students with the same questions. Then ask your tutor for help, or otherwise
the course coordinator.
If you have any problems with the assignment or the course, feel free to email, visit or call the
course coordinator.
All contact information is on Moodle.
Marking Guideline

CBOK Unsatisfactory
(U)
Satisfactory
(S)
Good
(G)
Marks
Allocated
A. Programming programming practices
such as commenting,
indentation etc.
III. computer program
produces correct
output
I. All satisfactory and
demonstrate very
good programming
skills.
20
B. Hardware and
software
fundamentals
I. Not able to list all
components of computer
architecture
II. Not able to identify all types
of operating system and
application software
I. Able to list some
components of
computer architecture
II. Able to identify some
types of operating
system and application
software
I. Able to list all
components of
computer architecture
II. Able to identify all
types of operating
system and
application software
III. Able to describe the
functional components
of the computer
system
10
C. Societal Issues for and how an intellectual
property should be used
I. Can list down most of
the major key areas in
the discipline where
privacy can be applied
II. Can account most of the
major legal issues for
and how an intellectual
property should be used
I. Can list down all major
key areas in the
discipline where privacy
can be applied
II. Can account all major
legal issues for and how
an intellectual property
should be used
10
Total 40

I. Code has compile/run/logic
errors.
II. Poorly written code.
I. Able to write a simple
code for a well-defined
problem
II. Use of basic standard
I. Unable to list down the key
areas in the discipline where
privacy can be applied
II. unable account legal issues

Program Marking Rubric

Exceptional Acceptable Amateur Unsatisfactory CBOK
Documentation
(3 Marks)
The code is well
documented. Comment
describes the main
components, variables,
functions. Comments are
used to describe the
structure. The comments
are up to date. The
comments are relevant,
and make sense to
someone unfamiliar with
the code
(3 Marks)
Comments describe most
components, variables
and functions. Some
comments might be
dated; most comment
may make sense to
someone unfamiliar with
code
(2 Marks)
There is visible attempt to
comment all components
and functions. However,
some comments might
be outdated, or only
relevant to someone
familiar with the code
(1 Marks)
There are no comments,
or poor comment; out –
dated, irrelevant, or cryptic
(0 Marks)
A.S.II
A.U.II
Programming
Style
(6 Marks)
The code uses layout to
convey the structure of the
program clearly. Different
components are easily
recognized. Name are by
themselves meaningful if
they refer to the specific
problem and generic if they
refer to part of the code
that is reusable. The code
adheres to the given
coding guideline. All
output is spelt correctly
with a proper layout.
(6 Marks)
The layout of the
program makes it
possible to identify the
structure of the program.
Names are meaningful in
the context of the
problem. The code
adheres to general
good
coding practices, and the
output is spelled
correctly with only
minor
glitches in layout
(4 Marks)
The layout of the program
makes it possible to
identify the structure of
the program with some
effort. Names make
sense to a person familiar
with the problem. The
code makes adheres to
some good practices, but
ignores others. Some
minor spelling mistakes,
or mistakes in layout
(2 Marks)
The layout of the program is
coincidental, and makes it
difficult to identify the
structure of the program.
Names are cryptic. No
discernible effort was made
to adhere to common
coding practices. The
output contains spelling
mistakes, and does not
make an effort to ensure
proper formatting
(0 Marks)
A.S.II
A.G.I
Semantics
(6 Marks)
The program uses the
programming construct
correctly and competently.
The program does avoid
programming short cuts,
and does not abuse
syntax. There are no
superfluous statements or
conditions, no dead
code, no unused
variables, no uninitialized
variables, no potential
division by zero or other
run-time error
(6 Marks)
The program uses most
constructs correctly and
as intended, and is only
sometimes overly
complicated. It may
contain
a few minor semantic
errors, such as dead
code,
or unused variables,
but
nothing that would cause
a run-time error
(4 Marks)
The program works most
of the times correctly
given some implicit
assumptions about its
use. The program uses
constructs differently from
their intended use. There
may be a few run time
errors that manifest
themselves for unusual
input or for certain
compilers
(2 Marks)
The program has
several minor run time
errors, like use of
uninitialized variables, or
one or more fatal run time
errors. It uses
programming constructs
with no regard for their
semantics or intended use
(0 Marks)
A.S.II
A.G.I
Functional
Correctness
(5 Marks)
The program satisfies all
requirements and
produces the correct
behavior for all possible
legal input. It handles
incorrect input and
responds adequately
(5 Marks)
The program satisfies the
requirements almost
completely, and produces
the correct answer for
all obvious legal input.
It handles all incorrect
Input without fatal failures
(3.5 Marks)
The program satisfies the
core requirements.
Some requirements
might not be
addressed. It produces
the correct output for
obvious legal input
( 2 Marks)
The program does not
satisfy core requirements.
It is easy to find
examples where the
program computes the
wrong result. The
program does fail for
unexpected input
(0 Marks)
A.S.III
A.U.I

Assessments mapping with CBOK

Core Body of KnowledgeCS111Assign1Assign2Assign3Test 1Test 2
ICT Professional
Knowledge
Ethics B
Professional expectations
Teamwork concepts/issues B
Communication
Societal Issues/Legal
issues/Privacy
B
Understanding the ICT profession
ICT Problem Solving: Abstraction B
Design
Technology Resources Hardware and Software
Fundamentals
B
Data and Information
Management
Networking
Technology Building Human Factors B
Programming B
Systems Development /
Acquisition
ICT Management IT Governance and organizational
issues
IT Project management
Service management
Security management