【SOF103】DESCRIPTION OF COURSEWORK
Course Code SOF103
Course Name C and C++ Programming
Lecturer Dr. Kamran Siddique
Academic Session 202009
Assessment Title Project (Replacement of Class Test)
A. Introduction/ Situation/ Background Information
The key characteristics of object oriented programming (OOP) are encapsulation, inheritance, and
polymorphism. In order to comprehend and utilize the advantages of the OOP, a project has been
designed to simulate the working of a banking account system. The students are expected to
implement it with an effective utilization of the characteristics of OOP focusing constructors, data
hiding and abstraction techniques, code reusability, virtual functions, input validations, and so on.
This activity also highlights the significance or report writing and effective presentation.
B. Course Learning Outcomes (CLO) covered
At the end of this assessment, students are able to:
CLO 1 Comprehend basic programming constructs of C and C++.
CLO 2 Demonstrate an understanding of the concepts and principles of C and C++
programming by solving real-world problems in particular.
CLO 4 Evaluate the given C/C++ code segments using algorithm tracing technique.
C. University Policy on Academic Misconduct
- Academic misconduct is a serious offense in Xiamen University Malaysia. It can be defined
as any of the following:
i. Plagiarism is submitting or presenting someone else’s work, words, ideas, data or
information as your own intentionally or unintentionally. This includes incorporating
published and unpublished material, whether in manuscript, printed or electronic form into
your work without acknowledging the source (the person and the work).
ii. Collusion is two or more people collaborating on a piece of work (in part or whole) which
is intended to be wholly individual and passed it off as own individual work.
OFFICE OF ACADEMIC AFFAIRS
Reference No. : XMUM.OAA - 100/2/8-V2.0
Effective Date : 23 APRIL 2018
iii. Cheating is an act of dishonesty or fraud in order to gain an unfair advantage in an
assessment. This includes using or attempting to use, or assisting another to use materials
that are prohibited or inappropriate, commissioning work from a third party, falsifying data,
or breaching any examination rules. - All the assessment submitted must be the outcome of the student. Any form of academic
misconduct is a serious offense which will be penalised by being given a zero mark for the
entire assessment in question or part of the assessment in question. If there is more than one
guilty party as in the case of collusion, both you and your collusion partner(s) will be subjected
to the same penalty.
D. Instruction to Students
Submit the following: - A folder of the project source code.
- A project report in MS Word containing the cover pages, table of contents, screenshots of
the output of your application with appropriate captions, marking scheme, and any other
information you would like to highlight. The length (no. of pages) of this report depends
on you as per your work. Include the source code as Appendix in this file. - An appropriate PowerPoint file showing the contributions of group members (if done in a
group) in addition to the presentation of the project. - Submit your final zip file at Moodle with a format: “Group_Name - Project_Leader_ID”.
- Submission deadline: 6 January 2020.
E. Evaluation Breakdown
No. Component Title Percentage
(%) - class BankAccount 20
- class SavingAccount 20
- Class CheckingAccount 30
- Project Report 15
- A PowerPoint Presentation File 15
TOTAL 100
F. Task(s)
? This is a group activity and maximum 4 students are allowed in one group.
? Analyze the requirements of the project carefully and divide the tasks among group
members to demonstrate an efficient teamwork. You should assign one member as a group
leader.
? The project should be implemented as a multi-file program i.e., using abstraction
methodology.
? You need to submit the following information (See the shared file at OneDrive) about your
group till 27 December, 2020.
o Group Name
o Group members name and ID (mention the group leader)
Create a class BankAccount to hold at least the following data / information about a bank
account:
? Account balance
? Total number of deposits
? Total number of withdrawals
? Interest rate e.g., annual rate = 0.05
? Service charges per month
The class should have the following member functions:
Constructor To set the required data. It may be parameterized or user’s input.
depositAmount A virtual function used to accept an argument for the amount to
be deposited. It should add the argument (amount) to the account
balance. It should also increment the variable used to track the
number of deposits.
withdrawAmount A virtual function used to accept an argument for the withdraw
amount operation. It should subtract the argument from the
account balance. It should also increment the used to track the
number of withdrawals.
calculateInterest A virtual function which calculates the monthly interest of the
account and then updates the account balance by adding it to the
principal amount.
Note: Use the standard formulas/operations (monthly interest
calculation) to implement this function.
monthlyProcessing A virtual function which calls the calculateInterest function,
subtracts the monthly service charges from the balance, and then
sets the corresponding variables such as no. of withdrawals, no.
of deposits, monthly service charges and so on.
getMonthlyStatistics A member function used to display the monthly statistics of the
account such as deposit, withdrawals, service charges, balance
etc.
Next, create a SavingAccount class which is derived from the generic class BankAccount.
It should at least have one additional data member, i.e., ‘status’ that will be used to show whether
account is active or inactive.
If the balance of a savings account falls below RM 25, it becomes inactive and the account holder
will not be able to perform withdraw operation anymore until the balance is raised above RM 25.
If balance becomes greater than or equal to RM 25, the account will become active again.
The most common member functions of the SavingAccount class are given below.
depositAmount A function which first checks whether the account is active/inactive before
making a deposit. If inactive and the deposit brings the balance above RM
25, the account will become active again. The deposit will then be made
by calling the base class version of the function.
withdrawAmount A function which first checks whether the account is active/inactive before
making a withdrawal. If active, the withdrawal will be made by calling the
base class version of the function.
monthlyProcessing
This function first checks the no. of withdrawals before calling the base
class version of this function. If the number of withdrawals are more than
4, a service charge of RM 1 for each withdrawal greater than or equal to
RM 4 is added to the base class variable that holds the monthly service
charges. Note: check the account balance after applying the service charge.
If the balance become lower than RM 25, the account becomes inactive
again.
Next step is to design a CheckingAccount class. It is also derived from the generic account
class and should at least have the following member functions.
withdrawAmount This function first determines whether a withdrawal request will cause the
balance to go below RM 0. If it falls below RM 0, a service charge of RM - will be deducted from the account, and the withdrawal will not be made.
If there is not enough amount to deduct the service charges, the balance
will become negative accordingly.
monthlyProcessing This function applies a monthly fee of RM 5 plus RM 0.10 per withdrawal
to the base class variable that holds the monthly service charges.
Input Validations: Apply input validations wherever appropriate such as input data format for
account number and title, and other validation checks applied in a practical banking system.
Assume the account number is a 6-digit integer value (324561).
Implement the above functionality using abstraction methodology. This project requires to
simulate one Saving and one Checking account, however, simulating multiple accounts (may be
up to 5) is encouraged. If you simulate multiple accounts, highlight it in your report and the
presentation file. You may need to add more member variables and functions than those listed
above. Your application should at least provide the following functionality (a sample run):
Bank Account System - Saving Account Number
- Saving Account Title
- Checking Account Number
- Checking Account Title
- Deposit in a Saving Account
- Deposit in a Checking Account
- Withdraw from Saving Account
- Withdraw from Checking Account
- Update and Display Account Statistics
- Exit
Upon selecting the desired option in the above menu, your application should perform the
required functionality.
APPENDIX 1
MARKING RUBRICS
Component
Title class BankAccount Percentage
(%) 15
Criteria
Score and Descriptors Weight
(%) Good Marks
(5)
Average
(3)
Poor
(0-1)
Class
declaration
All required member
functions and variables are
declared
Required member functions
and data members are
declared but some may not
be needed.
Missing public
and private/protected
members 5
Class
implementation
Member functions are
properly implemented and
tested
Member functions
definitions can be
improved
Member functions are not
implemented, not tested 10
TOTAL 15
Component
Title class SavingAccount Percentage
(%) 25
Criteria
Score and Descriptors Weight
(%) Good Marks
(5)
Average
(3)
Poor
(0-1)
Class
declaration
All required member
functions and variables are
declared.
Required member functions
and data members are
declared but some may not
be needed.
Missing public
and private/protected
members.
5
Class
implementation
Member functions are
properly implemented with
input validations.
Member functions
definitions can be
improved.
Member functions are not
implemented.
5
Inheritance Showed effective use of
base class public methods.
Showed minimum usage
of base class public
methods.
Poor use of base class public
methods.
5
Polymorphism Showed effective use of
polymorphism.
The concept of
polymorphism is not
properly utilized,
Didn’t apply the concept of
polymorphism. 5
Input
Validations
Strong input validation has
been applied.
Partial validation of the
input data.
Weak or no input validation
has been applied. 5
TOTAL 25
Component
Title class CheckingAccount Percentage
(%) 30
Criteria
Score and Descriptors Weight
(%) Good Marks
(5)
Average
(3)
Poor
(0-1)
Class
declaration
All required member
functions and variables are
declared.
Required member functions
and data members are
declared but some may not
be needed.
Missing public
and private/protected
members.
5
Class
implementation
Member functions are
properly implemented with
input validations.
Member functions
definitions can be
improved.
Member functions are not
implemented.
5
Inheritance Showed effective use of
base class public methods.
Showed minimum usage
of base class public
methods.
Poor use of base class public
methods. 5
Polymorphism Showed effective use of
polymorphism.
The concept of
polymorphism is not
properly utilized,
Didn’t apply the concept of
polymorphism. 5
Input
Validations
Strong input validation has
been applied.
Partial validation of the
input data.
Weak or no input validation
has been applied. 5
Driver program
Able to produce correct
results in testing. User
interface and outputs are
clear and functioning
correctly. Correct
instantiation and usage of
object of the class. Able to
use function calls by class
object.
Able to produce correct
results but with minor
formatting mistakes.
Correct user interface and
output format. Able to use
class objects and function
calls.
Unable to produce the correct
results. Incorrect user
interface and output format.
Unable to demonstrate the
usage of function call by class
object.
5
TOTAL 30
Component
Title Project Report Percentage
(%) 15
Criteria
Score and Descriptors Weight
(%) Good Marks
(6-8)
Average
(4-5)
Poor
(0-3)
Code
explanation
Provided sufficient comments
throughout the code,
flowcharts/diagrams to
describe the flow of the
program, important sections of
the program are explained
clearly
Need more comments to
explain the code,
flowcharts/diagrams to
explain the flow of the
program, missing important
points in explanation of the
program
Insufficient comments to
describe the code, unclear
explanation, lack of flow chart
or diagrams. Important sections
of the programs are not
explained
7
Report
Formatting
A well-formatted title page,
table of contents, screenshots
with proper orientation, and
appendix has been shown.
Partial demonstration of the
formatting rules and
screenshots orientation.
The report has many formatting
flaws and minimal or no
demonstration of the
screenshots.
8
TOTAL 15
Component
Title A PowerPoint Presentation File Percentage
(%) 15
Criteria
Score and Descriptors Weight
(%) Good Marks
(12-15)
Average
(8-11)
Poor
(0-7)
Presentation
quality
A professional look with clear
contents and images
(screenshots etc). The role of
each group member has been
clearly mentioned. Powerpoint
features have also been
utilized effectively, and a
good teamwork has been
shown.
Moderate presentation. The
roles of group members need
more clarity. Limited use of
Powerpoint features. A
moderate demonstration of the
teamwork.
Inappropriate selection of the
presentation theme. Contents
are not clear. The role of
group members are either not
given or not properly
assigned leading to
inefficient or no teamwork.
15
TOTAL 15
Note to students: Please print out and attach this appendix together with the submission of
coursework
推荐阅读
- C++基础知识|C++(char型总结一些细节知识点)
- PTA|【PTA乙级】【1101 B是A的多少倍 (15 分)】
- PTA|【PTA乙级】【1106 2019数列 (15 分)】
- 算法竞赛|【算法入门到进阶】【学习目录】
- 读书笔记之智能指针广度搜索
- C++|c++中string的模拟实现
- c++|c++的string类的模拟实现 以及basic_string::_M_construct null not valid错误的原因
- C++|[C/C++]详解STL容器1--string的功能和模拟实现(深浅拷贝问题)
- c++|模拟实现string类