cmpsc 201 - Penn State Altoona - Penn State University
cmpsc 201 - Penn State Altoona - Penn State University
cmpsc 201 - Penn State Altoona - Penn State University
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
SYLLABUS FOR CMPSC <strong>201</strong> SPRING <strong>201</strong>2<br />
Instructor: Tim Leso, Ph. D Office: 148 LRC Phone: 949-5287<br />
Electronic-Mail ID: T1L@PSU.EDU Bulletin Board: https://cms.psu.edu/<br />
On-Line Materials including Laboratory Assignments on ANGEL<br />
Office Hours: (148 LRC) Tues and Thurs: 3:55pm-4:50pm.<br />
(Virtual Office) on Angel (via Angel Mail)<br />
Lab work in (259 Haw) Tues & Thurs afternoons.<br />
Use ANGEL for course communications. PSU WebMail checked bi-weekly, from @psu.edu<br />
addresses only. Telephone Voice-Mail not used; leave phone message with Faculty Staff<br />
Assistant Mary Novella (or send PSU eMail communications to Mary Novella).<br />
Faculty Staff Assistant: Mary Novella Room: 144 LRC. Phone: 949-5320<br />
eMail Address: MLN13@PSU.EDU Fax located in 144 LRC: 949-5456<br />
===============================================================<br />
COURSE OBJECTIVES: Procedural computer programming and problem solving<br />
methodology using structured design techniques (modular pseudocode and tracing plus<br />
implementation in the C++ and MatLab programming languages). This course is commonly<br />
called CS1, Engineering Problem Solving, based on the ACM/IEEE-CS Joint Curriculum Task<br />
Force. At <strong>Penn</strong> <strong>State</strong>, CmpSc<strong>201</strong> emphasizes numerical methods for Engineering Problem<br />
Solving with C++ and MatLab. Prerequisite: MATH 140; Concurrent: MATH 141.<br />
COURSE OVERVIEW: Text: Engineering Problem Solving with C++, 3rd Edition by Etter<br />
(Delores M.). MatLab materials plus structured design techniques are provided by Professor<br />
Leso’s Postings on ANGEL. All of the Postings may be accessed freely throughout the semester<br />
via an Internet browser. Leso’s Postings are divided into Weekly Documents (e.g., Week1e.doc)<br />
that introduce problem solving methods and accompanying Lab Assignments. Only students<br />
registered for CmpSc<strong>201</strong> may read, write, and literally interact with the problem-based<br />
assignments provided by Leso and facilitated with ANGEL. Chapters to be read from the Etter<br />
text are announced in the Course Outline. Prior to attending class each week, it is expected that<br />
students read the assigned chapter(s) from Reading Assignments (see page 6), to become<br />
familiar with the weekly lecture topics (see page 5), and engage in problem-based learning<br />
during class/lab times facilitated by ANGEL (URL: https://cms.psu.edu/).<br />
COURSE WORK: The course is presented in a problem-based lab format. Labs cover<br />
computing problem solving methods introduced by instructor followed by direct student<br />
engagement with pseudocode designs, C++ and MatLab written code, execution, and submission<br />
of computer programs electronically to ANGEL drop boxes in the form of compressed zip files<br />
that contain documentation, design, code and output according to problem specifications.<br />
1
COURSE GRADING: Two problem solving exams @ 50% of course grade will occur around<br />
the 7 th and 13 th weeks of the semester. Three programming problems @ 40% of course grade<br />
will occur during the semester at approximately weeks 5, 10, and 15. The remaining 10% of<br />
course grade will be divided between lab preparatory work and class participation. A course<br />
grade of A will be awarded for point totals between 900-1000; A- = 880-899; B+ = 850-879; B =<br />
800-849; B- = 780-799; C+ = 750-779; C = 700-749; D = 600-699; below 600 = F.<br />
CLASS ATTENDANCE: Recommended. Demonstrations using computing technology occur<br />
in class via large screen display followed by hands-on, student engagements guided by the<br />
instructor which may only be possible while attending class/lab. Programming problem<br />
requirements (design specifications) are introduced by the instructor to facilitate comprehensive<br />
solutions that may be developed by both instructor and student participants. Problem extensions<br />
and refinements may be assigned later as lab work, progressive problems, and exam questions,<br />
mainly based on class room details that complement exercises and topics from the course<br />
textbook.<br />
GRADE POLICY: Lab work, programming problems, and written exams have scheduled<br />
deadlines. Students missing a scheduled deadline will forfeit 1/3 of the points for each day<br />
an assignment is not submitted. After 3 days of missing a deadline, no points will be given.<br />
Deadlines may occur at the beginning or end of lab time. Submission time is recorded when a<br />
student successfully posts his/her assignment to the designated ANGEL drop box. If a student<br />
posts an assignment after the deadline of the first day and before lab time on the second day, the<br />
assignment is automatically reduced in points by 1/3; after the deadline of the second day and<br />
before lab time on the third day, the assignment is automatically reduced in points by 2/3; after<br />
the deadline of the third day, no points will be given and the drop box is officially closed. Each<br />
student is limited to one posting per assignment. There will be plenty of opportunities to<br />
practice the necessary skills for mastery of submissions before the deadlines. Ordinarily, a fiveminute<br />
warning is given prior to a deadline. Only an Angel Mail posted in the instructor’s<br />
mailbox prior to a deadline will be considered for an omission.<br />
COURSE ETHICS: Students are responsible for completing individual assignments on your<br />
computing devices. You may not use, have in your possession, or loan another's device. (Backup<br />
of your work is required, preferably stored on ITS PASS Space, but a flash drive or use of<br />
ANGEL mail is acceptable.) Students using work or claiming work of others is unethical and a<br />
form of plagiarism. Working with others or receipt of assistance must be cited in the<br />
documentation of programs, specifically at the beginning of the source file comment lines<br />
of your problem module. Any use of design or code from classmates, tutors, friends, textbook<br />
references, web references, etc., must be documented. Unethical practices are addressed in<br />
<strong>Altoona</strong> College’s and Computer Science Department’s Policies.<br />
http://www.aa.psu.edu/academic/integrity.htm See also PSU Course Policies provided later.<br />
Sample Documentation of a problem module with receipt of assistance follows:<br />
//Programmer: Dr. T<br />
//Date Due: 1/17/12<br />
//Page 36 Chapter 2. Simple C++ Program to compute distance.<br />
//Assistance with sqrt()function provided by Rob the tutor on 1/16/12.<br />
2
DUE DATES: Programming Problems and Exams will have scheduled due dates which are<br />
announced on ANGEL; a tentative schedule is listed in this document (see Schedule…, page 5).<br />
The instructor reserves the right to adjust the due dates when situations necessitate. On the due<br />
date, a deadline is required for the submission of the assignment to an ANGEL folder. The time<br />
for the deadline may be start or end of lab time, with a 5-minute warning announcement given by<br />
the instructor before the pending deadline. Grading may only occur when the assignment is<br />
posted to an official ANGEL folder called a DROP BOX. Assignments are not to be mailed to<br />
the instructor’s ANGEL MAILBOX for submission. The best strategy to follow when<br />
submitting an assignment is to honor the deadline with at least some form of program that<br />
executes. A program that minimally executes and meets the deadline will normally provide the<br />
student with the highest grade points. If one misses the deadline however satisfies all of the<br />
programming requirements, there is an automatic late submission reduction of 1/3 points. Note<br />
that your course work will be based primarily on two important items:<br />
1. The quality of your work (your program executes to specifications); and<br />
2. That you meet your deadline for drop box submission.<br />
All college students profess to do great work, but may be lax about deadlines (E.G., professor,<br />
my submission was only 2-minutes pass the deadline!). Remember that your course grade will<br />
focus on both specific design requirements and meeting deadlines.<br />
OVERVIEW OF ASSIGNMENTS: Programming Problems and Exams are conducted in the<br />
computing lab. Seventy minutes are typically the maximum time available for graded<br />
assignments. An individual must have minimally input and output of his/her program executing to<br />
receive satisfactory credit. That is, at least the user interface between the client and the software<br />
program must be executable by the file named labx.exe to be considered successful. [If a labx.exe<br />
file is missing from the labx.zip file posted to the drop box, then that means there was no<br />
error-free code production. Thus no labx.exe results in unsatisfactory performance on a<br />
problem.] Practice is essential during lab work to develop a step-by-step, instruction-byinstruction<br />
testing strategy to guarantee successful execution under problem solving conditions.<br />
Your instructor advocates during his sample solutions to the class “a one construct methodology”<br />
of designing, compiling, debugging, executing, and testing program code which guarantees a<br />
student the ability to create an executable file if the “method” is mastered and used during<br />
assignments. Of course there are other problem solving methods such as brut force or trial-anderror,<br />
but there are no guarantees that ill-conceived habits of one’s choosing will meet a deadline<br />
with an executable. As for the written exams, they are designed to test your knowledge of the<br />
programming concepts core to any computing environment. These concepts cover variables, data<br />
types, storage formats, input and output formats, decision structures, looping structures, functions,<br />
parameters, compound data types, and files. Exam Practice! problems may be found in the<br />
textbook under the Practice! Modify! Problems sections. Exam problems may be administered<br />
with short answers, fill in the blanks, multiple choices, true/false, logical analyses, and syntax<br />
error recognition.<br />
ACCESSORIES: A minimum of 1 flash/usb drive is recommended for storage of your course<br />
work. Other media (e.g., ITS PASS Space) may be used in addition to a flash drive, especially<br />
for back-up storage when and if one loses a flash/usb drive. The internal and external labels of<br />
your flash drive should contain your last name for identification purposes, especially helpful<br />
since many students tend to leave the compute lab without removing their usb drive.<br />
3
EXPECTATIONS: Each student should read the ANGEL Weekly Postings and text before<br />
attending class. Lab assignments and problems will concentrate on the Postings. Attend all<br />
classes, and record design strategies/solutions to problems that are introduced in lab. These<br />
designs will be derived in a top-down manner and they will be presented collaboratively. Dr.T<br />
uses the Problem-Based Learning strategy (PBL) that seeks individual contributions to problem<br />
solving, not solely instructor dictation. Do not expect a line-by-line solution to be written on the<br />
board for you to copy. Do not expect the solution to be C++ code only. PBL suggests that you<br />
be given a written problem statement and enough constructive information so that when you<br />
leave the lab you are expected to analyze and construct an algorithm of your own solution to a<br />
similar problem outside of class. In lab, you will need to compile and build your program (and<br />
verify that it works correctly). Your instructor will give you test data to execute so that your<br />
output will conform to required specifications. After each class we recommend at least 2.5 hours<br />
of (practical) work to master your computing skills. To succeed in this course, you should<br />
build your own algorithm for each problem similar to those introduced in lab and<br />
understand how it works. To perform a step-by-step hand-calculation of your design/algorithm<br />
is recommended before coding. Programming/coding will translate from your correct algorithm,<br />
with the use of “the one construct methodology” and your textbook as a programming language<br />
reference manual for C++ syntax rules and examples of error-free coding techniques. Any and<br />
all refinements to your initial algorithm and program will be based on your understanding of<br />
the subject material (i.e., your tool to success). You should not rely on your friends,<br />
classmates, tutors, etc. to assist you throughout the semester. Once in awhile it may be necessary<br />
to minimize the time that it takes you to solve your problem by asking for and seeking<br />
assistance. When and if the need arises to seek help or render assistance, be sure to cite the<br />
person with whom you worked. Remember, you are responsible for academic integrity at the<br />
university; the instructor is responsible for enforcing the university’s code of conduct.<br />
HOW TO MEET THE DEMAND OF THE WORKLOAD: Start early and work through each<br />
introductory problem that is presented in lab. Each week a new construct of computing<br />
technology associated with problem solving and software programming skills is added to your<br />
learning objectives. From the very simple problem solving strategy introduced during the first<br />
week, you will be using and reusing that same construct throughout the semester as more<br />
complex strategies complement and add refinements to basic techniques. So, if you fail to<br />
understand HOW to apply the very simple problem solving strategy to more complex solutions,<br />
you will most likely miss the essence of solving computer-based problems. Computer-based<br />
problems use building blocks from simple/primitive constructs to develop advanced solutions to<br />
more complex algorithms. The simple constructs of data representation and storage (Ch 1.4) are<br />
employed more rigorously when functions (Ch 6) are designed and developed later. Complex<br />
solutions are composed of integrating smaller, more manageable modules into refined and highly<br />
complex software systems. You will not be expected to develop a complex software system, but<br />
you should appreciate HOW software is developed with primitive concepts that you solve your<br />
problems with your understanding. Your safest recourse is to try to master the basic concepts<br />
of data, storage, etc., then functions, by yourself (without too much help from the start) so you<br />
may apply your understanding throughout the semester. Challenge yourself to learn. Your<br />
workload will get easier after you master the basics, guaranteed.<br />
4
Schedule <strong>201</strong> Spring <strong>201</strong>2<br />
DETAILED SCHEDULE POSTED WEEKLY ON ANGEL<br />
CMPSC <strong>201</strong><br />
TENTATIVE COURSE OUTLINE<br />
SEMESTER<br />
5 MAJOR ASSIGNMENTS (Points)<br />
WEEK TOPIC LABS L1,L2, etc., Participation (100 Points)<br />
1 Computing Systems wk 1 L1 Engr. Problem-Solving Methodology<br />
P.14 Software (C, MATLAB) Ch 1.5 steps: St.Dio.Wo.Dev.Te.<br />
2 C++ Environment wk 2 L2 IDE Edit/Compile/Execute<br />
P.39 Modify! as lab2.zip prog.cppBuildlab2.exe<br />
3 C++ Program w/ Functions wk 3 L3 cmath Library Functions<br />
P.91 Problem 36. as lab3.zip Ch 2.8 Problem Solving Applied<br />
4 I/O Characters & Strings wk 4 L4 string & iomanip Functions<br />
P.68 char ch; cin.get(ch); Pgs.81, 46, 352, 568<br />
5 Structured Programming wk 5 L5 Problem 1 (100)<br />
P. 97 Pseudocode P.104 if(condition)…else<br />
6 Control Structures wk 6 L6 Selection<br />
P.136 Problems 14-15 as lab6.zip P.119 switch(exp)…case:<br />
7 Repetition Structures wk 7 L7 Exam 1 (250)<br />
P.141 while loop P.145 do/while loop<br />
8 Flow Control wk 8 L8 Loops<br />
P.148 for loop P.580 Using Matlab<br />
9 Files wk 9 L9 ofstream class member functions<br />
P.181 File streams .open() and .close()<br />
10 Modular Programming wk 10 L10 Problem 2 (200)<br />
P.228 Pgr-Def’d Functions P.239 parameter passing<br />
11 MatLab Operations wk 11 L11 Vector Processing<br />
P.309 Arrays P.319 function arguments<br />
12 2-D Arrays wk 12 L12 Linear Systems<br />
P.383 P.407 Matrices<br />
13 Matrices in MatLab wk 13 L13 Exam 2 (250)<br />
P.410 Matrix multiplication P.522 Recursive Fibonacci<br />
14 Simultaneous Solutions wk 14 L14 Cramer, Gauss<br />
P. 412 Symbolic Math ToolBox<br />
15 Plotting wk 15 L15 Problem 3 (100)<br />
Problems 1,2,3 are evaluated for a total of 400 points, w/ grading rubric for Problem 2<br />
consisting of Documentation (25 points), Design (25), Code (100), and Output (50)…RE: page<br />
7.<br />
Exams 1,2 are 250 points each; the other 100 points are for lab work and participation.<br />
Sample problems may include Monte Carlo Simulation, Newton and Euler Methods, Matrix<br />
Multiplication, Linear Systems, Gauss Elimination, Cramer’s Rule, and Vector Processing.<br />
5
Reading Assignments in<br />
SEMESTER<br />
Engineering Problem Solving with C++<br />
WEEK TOPIC by Etter (see footnote below)<br />
1 Syllabus & Prob.Solving wk 1 Ch 1, Data and Storage<br />
2 IDE Code Development wk 2 Ch 2 & Ch 4.7 MSVC++<br />
3 Library Function Calls wk 3 Ch 2.7 & Appen A, B, E<br />
4 Char, String Functions wk 4 Ch 7.7-7.8 & Appen A, B<br />
5 Control Structures wk 5 Ch 3 Selection if/else<br />
6 Control Structures wk 6 Ch 3 Selection switch<br />
7 Repetition wk 7 Ch 4, *Matlab basics<br />
8 Repetition wk 8 Ch 4, *Matlab Flow Control<br />
9 Data Files wk 9 Ch 5 & Appen C<br />
10 Functions wk 10 Ch 6<br />
11 1-D array wk 11 Ch 7 and Matlab<br />
12 Matrix wk 12 Ch 8 and Matlab<br />
13 Recursion wk 13 Ch 10.4 and Matlab<br />
14 Matlab wk 14 Appendix C and EXCEL<br />
15 Plotting wk 15 ANGEL and Matlab<br />
Footnote: Other reading assignments and variations will be announced on ANGEL.<br />
*Matlab Web Site Tutorials: http://www.math.siu.edu/matlab/<br />
http://www.mathworks.com/products/matlab/<br />
MATLAB ® is a high-level language and interactive environment that enables you to perform computationally<br />
intensive tasks faster than with traditional programming languages such as C, C++, and Fortran.<br />
6
Programmer: Dr. T<br />
//Date Due: 1/17/12<br />
//Page 84 Chapter 2. Simple C++ Programs.<br />
//Assistance with setprecision() function provided by Rob tutor on 1/16/12.<br />
/*Design intentionally incomplete<br />
Prompt:<br />
output "Please enter Pay Amount and Pay Period, ",<br />
"For Example: \n 1357.50 26 \n"<br />
Input:<br />
input PayAmount, PayPeriod<br />
Echo:<br />
output "Your Pay Amount is $"
PENN STATE COURSE POLICIES<br />
Academic Integrity Policy<br />
According to the <strong>Penn</strong> <strong>State</strong> Principles and <strong>University</strong> Code of Conduct:<br />
Academic integrity is a basic guiding principle for all academic activity at <strong>Penn</strong> <strong>State</strong><br />
<strong>University</strong>, allowing the pursuit of scholarly activity in an open, honest, and responsible<br />
manner. In according with the <strong>University</strong>'s Code of Conduct, you must not engage in or<br />
tolerate academic dishonesty. This includes, but is not limited to cheating, plagiarism,<br />
fabrication of information or citations, facilitating acts of academic dishonesty by others,<br />
unauthorized possession of examinations, submitting work of another person, or work<br />
previously used without informing the instructor, or tampering with the academic work of<br />
other students.<br />
Any violation of academic integrity will be investigated, and where warranted, punitive action<br />
will be taken. For every incident when a penalty of any kind is assessed, a report must be filed.<br />
This form is used for both undergraduate and graduate courses. This report must be signed by<br />
both the instructor and the student, and then submitted to the College representative.<br />
Affirmative Action & Sexual Harassment Policy<br />
The <strong>Penn</strong>sylvania <strong>State</strong> <strong>University</strong> is committed to a policy that all persons shall have equal<br />
access to programs, facilities, admission, and employment without regard to personal<br />
characteristics not related to ability, performance, or qualifications as determined by <strong>University</strong><br />
policy or by Commonwealth or Federal authorities. <strong>Penn</strong> <strong>State</strong> does not discriminate against any<br />
person because of age, ancestry, color, disability or handicap, national origin, race, religious<br />
creed, gender, sexual orientation, or veteran status. Direct all inquiries to the Affirmative Action<br />
Office.<br />
Americans with Disabilities Act<br />
CSE welcomes persons with disabilities to all of its classes, programs, and events. If you need<br />
accommodations, or have questions about access to buildings where CSE activities are held,<br />
please contact us in advance of your participation or visit. If you need assistance during a class,<br />
program, or event, please contact the staff or faculty member in charge of your CSE department.<br />
An Invitation to Students with Learning Disabilities<br />
It is <strong>Penn</strong> <strong>State</strong>'s policy to not discriminate against qualified students with documented<br />
disabilities in its educational programs. If you have a disability-related need for modifications in<br />
your testing or learning situation, your instructor should be notified during the first week of<br />
classes so that your needs can be accommodated. You will be asked to present documentation<br />
from the Office of Disability Services that describes the nature of your disability and the<br />
recommended remedy. You may refer to the Nondiscrimination Policy in the Student Guide to<br />
<strong>University</strong> Policies and Rules.<br />
8