You are on page 1of 3

Computer Programming 2

HW#1
Due: Sunday, January 29th, 2023

This coursework is intended to help you deal with real-life problems using C++ skills learned
during the semester. Besides the technical skills, one of the most important skills for
programmers is the team working skill, therefore, you are asked to form a group of 4-5
students. The coursework accounts for 15% of the final mark for this course.

The project has one large problem that can be split into smaller problems for usability reasons.
You are expected to programmatically solve the currency exchange problem, which is the
process that allows customers to exchange one currency for another. The skills that are needed
to complete the coursework successfully are, decision-making statements, loops, arrays, file
I/O, string, and functions. Following are the program details.

Main functionality (70%):


• As you might know, currency rates are influenced by several factors such a country's
economic performance. Thus, it is better to get the upto-date currency rates from an
external source as it is easier to update. You should read the data from the file attached,
“ExchangeRate.txt”.
• The program should print the available currencies for exchange which are:
o SAR --> Saudi Arabia Riyal
o KWD --> Kuwaiti Dinar
o QAR --> Qatar Riyal
o AED --> United Arab Emirates Dirham
o BHD --> Bahraini Dinar
o OMR --> Omani Rial
Please make sure the user only enters the correct currency abbreviations (e.g., SAR).
Otherwise, ask them to re-enter the currency until they get it right.
• For usability reasons, the user can enter their currencies in capital or small letters (i.e.,
SAR, SaR, sar, and SAR are all correct inputs).
• You are expected to use at least one void function and one value returning function.
Feel free to use them for any part of your program.
• The data file shows the currency exchange between two currencies. For example, if the
file shows “1.00 KWD= 12.27 SAR”, you can use this line to exchange KWD to SAR and
also exchange SAR to KWD.
Readability (5%):
You are required to make your code readable; marks will be deducted if any of the following is
missing:
• Comments that:
o Explain the purpose of the program
o Identify the owners (who wrote it) and their ID
o Identify the input and output of the code
• Comments that explain the purpose of every function, the function formal parameters
(arguments) and return value.
• White spaces such as indentation, spaces, and blanks.
Evaluation (0%):
• There are no marks for the evaluation, but your program will be correct if it provides similar
output for the given input below:

Sample run1:
The currencies we have exchange for are:
SAR --> Saudi Arabia Riyal
KWD --> Kuwaiti Dinar
QAR --> Qatar Riyal
AED --> United Arab Emirates Dirham
BHD --> Bahraini Dinar
OMR --> Omani Rial
What is the currency you have? SaR
What is the currency you want to exchange it for?
aed
How much money you want to exchange?
707
707 SAR is 692.86 AED

Sample run2:
The currencies we have exchange for are:
SAR --> Saudi Arabia Riyal
KWD --> Kuwaiti Dinar
QAR --> Qatar Riyal
AED --> United Arab Emirates Dirham
BHD --> Bahraini Dinar
OMR --> Omani Rial
What is the currency you have? Kuwaiti
Incorrect abbreviation please provide it again
Sad
Incorrect abbreviation please provide it again
SAR
What is the currency you want to exchange it for?
BHR
Incorrect abbreviation please provide it again
BHD
How much money you want to exchange?
50
50 SAR is 5 BHD
Presentation (20%):
Your group should present your solution in front of your classmates. The presentation requires
only explaining and running the code with given data. Anyone in the group is expected to
answer the post-presentation questions. The points to be considers for marking are:
• Delivery: Holds attention of entire audience with the use of direct eye contacts. Speaks with
fluctuation in volume and inflection to maintain audience interest and emphasize key
points.
• Content: Demonstrates full knowledge in the demonstration and answering all class
questions with explanations and elaboration
• Enthusiasm: Demonstrates strong enthusiasm about topic during entire presentation
• Task Distribution: Students need to learn how to work with others. Therefore, everyone
needs to be accredited for the work they did. Please have a slide for the task distribution
and the help received.

Submission Instructions
• You should turn in only the code in a .txt format. Your submission should be in the style:
groupNymber_section_CP2.txt (e.g., grou1_260_CP2.txt)
• You should submit your assignment with the above file format, otherwise, you will be
instructed to resubmit them and lose 2 marks for the late submission.
• You can submit your files several times, only the last submission will be marked.
• If for any reason you were unable to submit your assignment by the deadline, you may send
it to my email or hand it to me either a printed document or a handwriting solution marked
with your name and ID at the top of each page.
• You will be penalized two marks for the late submission.
• Make sure of your code originality because any code that is seen to be similar to other’s
code will yield at failing this course work.

You might also like