CC103
CC103
COURSE SYLLABUS
COURSE DESCRIPTION: The course trains students on the proper and judicious use of recursive code structures, proper parameter passing methods, data structures beyond
primitive types and simple arrays of primitive types, and text files. The course also trains students on how to plan and execute ways to test their
code with respect to common and boundary cases and on how to properly format and document their code with respect to appropriate coding
standards
The coverage of this course extends the topics of programming fundamentals by covering the parameter passing mechanisms of user-defined
functions, definition and applications of recursive functions, specification and implementation of arrays, matrices, records, and linked-lists, and
use of files.
PRE-REQUISITE: CC102
UNITS: 3
CONTACT HOURS PER WEEK: 2 HOURS LECTURE and 3 HOURS LABORATORY
OUTCOMES: On the completion of the course, student is expected to be able to do the following:
1 | Page
various constraints LO2 Assess and recommend revision to another programmers code
(1) Regarding appropriateness of chosen data structure.
Communicate effectively with the computing community and with society (2) Regarding appropriateness of the chosen conditional iterative
at large about complex computing activities through logical writing, constructs given a programming task and
presentations and clear instructions (3) Regarding thoroughness in applying procedural abstraction
LO3 Argue the cost and benefits of dynamic and static data structure
implementations.
LO4 Integrate Learning Management System in communication and submission
of the projects and outputs.
certificateofDeposit
checkingAccount savingAccount
serviceChargeChecking
noChargeChecking
highInterestsSavings
2 | Page
highInterestChecking
Note that the classes bankAccount and checkingAccount are abstract. That is we cannot instantiate object of these classes. The other class in figure 14-22 are not abstract.
C++ Programming Problem Analysis to Program Design
D.S Malik Programming Exercises No. 5 Page 799 - 781
TERM OUTPUT:
#include <iostream>
(
)
a. Write a statement that includes header file fstream, string and iomanip in this program
b. Write statement that declares inFile to be an ifstream, variable and outfile to be an ofstream variable
c. The program will read data from the file inData.txt and write output to the outData.txt. Write statements to open both of these files, associate inFile with inData.txt and
associate output file with outdata.txt.
d. Suppose that the file in inData.txt contains the following data:
10.20 5.35
15.6
Randy Gill 31
18500 3.5
A
The number in the first line represent the length and width, respectively, of a rectangular. The number on the second line represent the radius of a circle. The 3 rd line
contains the first name, last name and age of the person. The fourth line is the savings account balance at the beginning of the month, and the second number is the interest
rate per year. (Assume thatp =3.1416) and the fifth line contains an upper case letter between A and Y (Inclusive).
Write statements so that after the program executes, the content of the file outData.txt are as shown below. If necessary, declare additional variables. You statement should
be general enough so that if the content of the output file of the input file changes and the program is run again (without editing and recompiling), it outputs the appropriate
results.
Rectangle:
Length = 10.20,
Width = 5.35,
Area = 54.57,
3 | Page
Parameter = 31.10
Circle:
Radius = 15.60,
Area = 764.54
Circumference = 98.02
Name: Randy Gill, Age: 31
Beginning Balance = 18500.00, Interest Rate = 3.50
Balance at the end of the month = 18553.00
The character that comes after A in the ASCII set is B.
e. Write statements that close the input and output files.
f. Write a C++ program that test the statements in part a through e.
4 | Page
1. Write a program that converts a number entered in ROMAN NUMERALS to DECIMAL. Your program should consist of a class, say romanType. An object to type
romanType should do the following:
a. Store the number as a Roman Numeral
b. Convert and store number into decimal form
c. Print the number as a Roman numeral cr decimal number as requested by the user.
The decimal values of the Roman numeral number are:
M 1000
D 500
C 100
L 50
X 10
V 5
I 1
d. Test your program using the following Roman numerals: MCXI, CCCLIX, MDCLXVI
2. Design and implement a class dayType that implements the day of the week in a program. The class dayType should store the day, such as Sun for Sunday. The program
should be able to perform the following operations on an object of type dayType:
a. Set the day
b. Print the day
c. Return the day
d. Return the next day
e. Return the previous day
f. Calculate and return the day by adding certain days to the current day.
For example if the current day is Monday and we add 4 days, the day to be returned is Friday. Similarly if today is Tuesday and we add 13 days the day to be returned
is Monday.
g. Add the appropriate constructors.
C++ Programming Problem Analysis to Program Design
D.S Malik Page 657 No. 1, 2
GRADING SYSTEM:
5 | Page
Assignment 20% Term Output 20%
Class Participation 15% Laboratory Exam 35%
100% 100%
FINAL GRADE
Prelim Grade + Midterm Grade + Final Grade 70%
Comprehensive Exam 15%
Semestral Output 15%
100%
COURSE OUTLINE:
MAJOR
SPECIFIC
LEARNING COURSE
WEEK LEARNING LEARNING LEARNING
OUTCOME OUTPUT TOPICS TA ASSESSMENT REFERENCES
# OUTCOME OUTPUT ACTIVITIES
(LO) (MCO)
(SLO)
Course 2 Discussion
1 Orientation Hours
Discuss the rules
and regulations
Discuss the
different expected
output
Discuss the
Grading System
6 | Page
MCO1: Design Examine High Explore how C+ The Language of a 2 Lecture Quiz C++ Programming
an algorithm Level program processed computer Hours Discussion Programming Problem Analysis
2 LO1 that does the Programming Become aware of a The evolution of Program Exercises to Program Design
following Languages structure design programming Simulation D.S Malik
Page 38. No. Discover what a and object oriented languages Page 21 36
22 - 23 compiler is and design Processing a C++ Program Hands On
what is does programming program Exercises Examination
methodologies Programming with 3
the Problem Analysis Hours
Coding Execution
Cycle
Programming
Methodologies
ANSI/ISO Standard
C++
MCO2: Explore simple Create a program Basic elements of C+ 2 Lecture Quiz C++ Programming
Convert Length datatypes that convert + Hours Discussion Programming Problem Analysis
3 LO1 (Page 94) Examines how number into string A C++ program Program Exercises to Program Design
program evaluate using string data Data types Simulation D.S Malik
arithmetic types Arithmetic Operation 3 Page 39 59
operations and Operator Hours Program Hands On
Precedence Exercises Examination
- Expression
Type of conversion
(casting)
String type
Input
MCO3: Make Examine ways to Write a program Increment and 2 Lecture Quiz C++ Programming
Change output results with arithmetic Decrement Operators Hours Discussion Programming Problem Analysis
4 LO2 (Page 97) using output operators - Output Program Exercises to Program Design
statements Debug a program Preprocessor Simulation D.S Malik
syntax error Directives Hands On Page 39 59
7 | Page
Debugging: Examination
Understanding and
fixing program errors
Program style an
forms
More on assignment
statement
MCO4: Identify and Discover how to Increment and 2 Lecture Quiz C++ Programming
Convert Length become familiar input data into Decrement Operators Hours Discussion Programming Problem Analysis
4 LO2, LO4 (Page 94) with the use of memory using - Output Program Exercises to Program Design
Make Change increment and input and output Preprocessor Simulation D.S Malik
(Page 97) decrement statements Directives Hands On Page 72 97
operators Debugging: Examination
Understanding and
fixing program errors
Program style an
forms
More on assignment
statement
6 PRELIMINARY EXAMINATION
MCO5: What Learn about Create programs Control Structure Lecture Quiz C++ Programming
is the output of control structure using control (Selection) Discussion Programming Problem Analysis
7 LO3 the following Examine selection structure - Control Program Exercises to Program Design
program? relational and (if, if else and Structures Simulation D.S Malik
Page 222 No. 9 logical operators switch in a Relational Operators 3 Page 169 181
program) and learn Logical Boolean Hours Program Hands On
how to avoid bugs operators and Logical Exercises Examination
by avoiding expression
8 | Page
3 Program
Hours Exercises
9 | Page
MCO8:Create Examines various Explore ways to Records (structs) 2 Lecture Quiz C++ Programming
a program operation on a manipulate data Programming Hours Discussion Recitation Problem Analysis
using an array struct using struct example: Sales Data Program Laboratory to Program Design
10 LO3, LO4 of struct items Analysis Simulation Activity D.S Malik
3 Program 562- 592
Hours Exercises
11 MIDTERM EXAMINATION
MCO9: Largest Learn about user- Create a program User defined 2 Lecture Quiz C++ Programming
Number defined functions using user defined functions Hours Discussion Recitation Problem Analysis
12 LO1, LO4 Page 320 and examine functions. - Predefined Program Laboratory to Program Design
value-returning functions Simulation Activity D.S Malik
Cable functions, - Value returning Page 302 305
Company including actual functions Page 338 356
Page 322 and formal Void Functions
parameters Value Parameters
- Reference value
as parameters
- Value and
reference
parameters and
memory
allocation
Reference parameter
and value returning
functions
Scope of an identifier
MCO10: Explore how Create a program Classes and data 2 Lecture Quiz C++ Programming
Candy information using OOD abstraction Hours Discussion Recitation Problem Analysis
13 LO2 Machine hiding is A struct versus a Program Laboratory to Program Design
10 | P a g e
Input: The item implemented in class 3 Simulation Activity D.S Malik
selection and C++ Information hiding Hours Page 595 - 661
the cost of the Examine Executable code
item constructors and Static members of a
Output: The destruction class
selected item
Page 637
Complete
Program listing
Page 644
649
MCO11: Become familiar Examine how the Inheritance and 2 Lecture Quiz C++ Programming
Create a with the 3 basic constructor of base compositions Hours Discussion Recitation Problem Analysis
14 LO2 program using principles of and derived classes Object oriented Program Laboratory to Program Design
pointer, 2 object oriented works, and design and object Simulation Activity D.S Malik
dimensional design redefine the oriented 3 Page 661 711
array And explore 3 member function programming Hours
Page 776 No. types on of a base class
22 (a d) inheritance:
PUBLIC,
PROTECTED
AND PRIVATE
Examine the Discover the Pointer, classes, 2 Lecture Quiz C++ Programming
relationship peculiarities of virtual function and Hours Discussion Recitation Problem Analysis
15 LO2 between the classes with abstract classes Program Laboratory to Program Design
address of pointer member - Address of Simulation Activity D.S Malik
operator and variables, explore operator (&) 3 Page 722 - 753
classes and use the NEW, - Dereferencing Hours Program
Become aware of DELETE operators Operator (*) Exercises
abstract classes to manipulate - Initializing
dynamic variables. pointer variables
- Classes and
Learn about the
11 | P a g e
pointer data type pointers
and pointer - Address and
variables operator classes
16 FINAL EXAMINATION
REFERENCE:
Approved by:
_____________________ _____________________
Gigi Sunga Flocerfida E. Ayangco
Head, Academic Affairs School President
12 | P a g e