26
300580 Programming Fundamentals Autumn 2012 Learning Guide School of Computing, Engineering and Mathematics

300580 Programming Fundamentals - SCEM Staff Linux …staff.scem.uws.edu.au/~zhuhan/pfcpp/outlines/pf2012learningguide.pdf · 300580 Programming Fundamentals Autumn 2012 Learning

Embed Size (px)

Citation preview

300580 Programming Fundamentals Autumn 2012

Learning Guide School of Computing, Engineering and Mathematics

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

1

Table of Contents

SSEECCTTIIOONN 11: AABBOOUUTT PPRROOGGRRAAMMMMIINNGG FFUUNNDDAAMMEENNTTAALLSS

1. An introduction to this unit

2. Approach to teaching

3. Staff details

4. Student consultation arrangements

5. Student feedback and improvements to the unit

SSEECCTTIIOONN 22: YYOOUU AANNDD TTHHIISS UUNNIITT

6. What is expected of you

7. What you can expect from me

8. How to use this learning guide

9. Policy and how it affects you

10. What to do if you have a problem/concern

SSEECCTTIIOONN 33:: TTEEAACCHHIINNGG AANNDD LLEEAARRNNIINNGG AACCTTIIVVIITTIIEESS

11. Schedule of teaching and learning activities

SSEECCTTIIOONN 44:: AASSSSEESSSSMMEENNTT IINNFFOORRMMAATTIIOONN

12. Assessment summary

13. Learning outcomes and assessment

14. Assessment details

Topics breakdown in terms of grades

Tutorial/practical exercises

Assignment 1

Assignment 2

Mid-semester test

Final examination

Assignment Cover Sheet (if required)

SSEECCTTIIOONN 55:: LLEEAARRNNIINNGG RREESSOOUURRCCEESS AANNDD IINNFFOORRMMAATTIIOONN

15. Overview of learning resources

16. People who can help

17. Useful reading

18. Online resources

19. UWS website – Current students

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

2

20. Referencing requirements

About Programming Fundamentals

1. An introduction to this unit

The art of programming is complex. It requires the exercise of several different skills. It is at the same time analytical and synthetic. It demands both precision and imagination. The written form of a program must be suitable for consumption by both computers and humans. Program writing is similar in some ways to the composition of music commissioned for a specific purpose and just as a sheet of music is effectively a set of commands to a musician, so too a program is a set of instructions to a computer.

Programming is a special kind of reasoning. To become a programmer requires lots of practice in designing and in analysing programs. So although programming goes on in your head and is mostly thinking, learning to program means spending lots of time practicing to gain fluency and experience.

When learning your first programming language, it is easy to get the impression that the hardest part of solving a problem on a computer is translating your ideas into the specific language that will be fed into the computer. This is definitely not the case. The most difficult part of solving a problem on a computer is coming up with the method of solution. After you have developed a method of solution, it is routine to translate your method into the required language; be it C++ or any other programming language. When solving a problem with a computer, it is therefore helpful to temporarily ignore the language and to concentrate instead on formulating the steps of the solution and write them down in plain English, as if the instructions were to be given to a human being. A set of instructions expressed in this way is frequently referred to as an algorithm.

Programming should not be confused with coding, which is a matter of writing programs down in a form that can be understood by computer programming systems (compilers, interpreters or whatever). Once you can program, you can code with ease, but not vice-versa.

Reading a book or listening to lectures is not enough to make you a programmer. I repeat: to learn to program you must practice. Reading the text books should make the ideas plausible to you. That is the first stage of your learning, and the one which requires the least effort. The second stage of understanding is to be able to follow other peoples' reasoning.

Programming must be creative, but nobody can teach you creativity. You can learn it but only if you work at it consistently. Practice and more practice is what you will need. One of the difficulties you may face - and overcome - arises from the need for precision and the need for simplicity when writing programs. The need for precision makes some programs large, but even the largest program must be kept simple enough to understand. The most effective way to keep a program simple is to make it out of a small number of pieces, joined together to form one of the standard program structures. Understanding a program that is constructed in this way is a matter of understanding its various components separately and then understanding the way they fit together.

No pre-requites are required for this unit.

Section

1

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

3

2. Approach to teaching

This unit enhances learning through the following means:

Lectures – all regular lecture notes are available on vUWS. They contain the main points and key issues for the unit, and indicate the depth of understanding expected of the students. As such, lecturers may choose to elaborate more on certain more important or fundamental concepts or techniques during the class and leave the uncovered slides to be studied by the students themselves.

Tutorials/Practicals – provide students with hands-on experience working with basic data types, loop constructions, function calling as well as the concept and use of arrays. Among all the tutorial/practical questions, some are indicated to the students so that they can attempt these questions before the scheduled class. Many of these questions will be fully or partially explained during the practicals so that students will at least be exemplified with selected examples/questions on the concepts and techniques required for that particular practical. Students will be asked to complete their solutions later in the week at least to those questions selected by the tutor, if they can’t already do so during the class, and will be asked to hand them back during the next tut/practical class. The tutorials/practicals will typically consolidate what the students have already learned in the previous week/s, with possibly some relevant additional materials as well, and will provide feedback immediately in class and in person so that students are aware of their level of understanding of the material being presented. Solutions or hints to theory questions and practical exercises will be provided by the tutors only during the scheduled tut/practical sessions.

Online practice quizzes and online programming drills are also provided.

Assignments – two assignments are set to go through the complete process of constructing simple but meaningful enough application programs. Assignment 1 is largely preparing students with individual theory and program components on such as basic conditional statements and loops etc. And assignment 2 will ask students to make use of these component techniques, plus a few additional ones, to construct a complete and concerted application program.

Textbook – the text provides additional detail and examples on top of what is in the lecture notes. Students should try to read through the relevant parts as much as possible as the textbook provides many more examples and explanations.

Optional Content – There are a variety of slides or practical paragraphs marked explicitly as optional. These will not be assessed in any way, although they will help students a great deal in better understanding the topics in this unit.

vUWS – all announcements and teaching materials, including all assignments, are accessible via vUWS. All submissions must be electronic and through the submission page at the unit website. Students are required to visit the unit website for the latest announcement on a regular basis.

3. Staff details

Unit Coordinator: Dr Zhuhan Jiang Building ER, Room 1.04, Parramatta Campus

Phone: 96859336 Email: [email protected]

First Point of Contact: Dr Zhuhan Jiang See the above

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

4

Lecturers: Dr Zhuhan Jiang Lecturer for Parramatta Campus See the above

Dr Jiansheng Huang Lecturer for Penrith Campus

Building Y, Room 3.28, Penrith Campus

Phone: 47360318 Email: [email protected]

Dr Jianhua Yang Lecturer for Campbelltown Campus

Building ER, Room G.12, Parramatta Campus

Phone: 96859233 Email: [email protected]

Other Teaching Staff: Additional Tutors - TBA

4. Student consultation arrangements

Please consult the unit website at vUWS for the up to date details on the consultation times. They are being displayed on the Schedule page of the unit website, rather than in this document, so that any potential changes can be reflected accordingly should any of such changes become unavoidable due to unexpected circumstances. It may also be desirable for the students to consult the campus lecturers directly for his or her most recent consultation hours in case of such unexpected changes.

5. Student feedback and improvements to the unit

Continuing and unabated efforts are being undertaken to improve the teaching and learning experiences. While some changes may be in response to the student feedback in the past, a great many of others are also introduced for the further improvement of this unit. In particular, we will have more drilling and examples on the basics - including flowcharts and code walking, more animation effects to present lecture material, further narrowing on the core tut/prac exercises, online exercises quizzes, additional videos on basic programming, additional sample assignments and their solution hints, more effective class structure and assessment format on tutorial/prac classes, more concrete approaches/styles to assignments, and clearer guide on expectations on different grades of different assessments.

A completely new online programming drill system has just been developed for this unit, so that students can do the programming drills freely and as many times as they wish, and also get their work marked automatically along with some instant feedbacks.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

5

You and This Unit

6. What is expected of you

Unit credit points and Workload This unit is a 10 credit point unit and will require your full and continuous attention to maintain the highest possible grades. It is expected that you will spend at least 10 hours each week (on average) which includes the four (4) contact hours per week. Some weeks you will spend more time on learning activities and assessments and in other weeks the workload will be somewhat less. It will be essential for you to keep up with the assigned reading so that you are properly prepared for each session.

Attendance Students are expected to attend each week a 2 hour lecture and a 2 hour tutorial/ practical.

Online learning and other learning strategies Students should access vUWS to check the latest unit announcements at least twice a week.

Lecture notes will be made available before the corresponding class commences. Students are highly recommended to read through those notes before attending a lecture. Please note the presentation of those notes in the class often has some interactive effect and may also supply additional learning material.

The material introduced in a lecture is usually contained and strengthened in the corresponding tutorial/ practical in the following week/s. For each tutorial/practical, students are required to complete some of the questions, recommended to them specifically in the respective tutorial/practical page, before their attendance of the practical.

The students in this unit come from various different courses, and may have different background and experiences. Some may be in a position to attempt at more advanced material. The lecture notes and the practicals may sometimes contain sections marked as optional. While such optional material will not be formally examinable, students are nonetheless encouraged to pursue it whenever they can.

Most tutorial questions are taken directly from the textbook, and there are already plenty of samples with thorough solutions in the textbook. Hence the acquisition of a copy of the textbook in good time is essential.

Please note that solutions to the tutorial/practical questions are mostly discussed during the corresponding practical classes and will be published on the unit website typically one or two weeks afterwards.

When vUWS is busy or slow, you may access the same unit material at http://staff.scm.uws.edu.au/~zhuhan/pf2012/index-frames.html. Bookmark it!

Finally, please do not leave behind any work or exercises that are already due in terms of the unit progression, no matter how simple or even “trivial” they may somehow appear.

Section

2

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

6

General conduct and behaviour According to the UWS Teaching and Learning code (http://policies.uws.edu.au/view.current.php?id=00139 ) you are required to:

• obtain the unit outline for this unit, by the end of the second teaching week; • regularly and actively participate in all scheduled educational activities, which includes lectures,

tutorial, laboratory sessions, online activities etc; • give honest, helpful and courteous feedback to your lecturer(s) • make every effort to undertake the work required to successfully complete this unit; • submit work that is your own for any assessment task; • not indulge in any behaviour that disrupts the teaching and learning environment, or negatively

affects fellow students and university staff, and understand that the University will take action against such behaviour as outlined in the Misconduct – Students Non-Academic Misconduct Policy

• treat university property with due care and report any damaged or broken equipment. In addition, you should:

• be on time to lectures, tutorial and laboratory sessions. If you are late, then please enter the lecture/tutorial room or lab with courtesy and consideration for others;

• pay attention in lectures ,tutorials and laboratory sessions as this is where helpful information is given out of the assessment tasks;

• switch off your mobile phone • ask questions about the content that you found difficult, immediately after the lecture, tutorial or

lab session finishes. If this cannot be accomplished, then make sure you see your lecturer or tutor as soon as possible to resolve any problems.

7. What you can expect from me (your lecturer and/or the

teaching team)

Feedback The assessors will provide you with oral and/or written feedback on class activities or assessments during or immediately following the class in which they were presented. You will also receive feedback before you submit, when pertinent, and after handing in your assignment solutions.

Consultation Lecturers are available to meeting with you at any agreed time by appointment, and will undertake to keep the hour prior to the campus class free as much as possible so this would be a good time for meetings.

General conduct and behaviour It is our aim to create a learning environment so that you may reach your full potential in this unit. Accordingly, you can expect from the lecturing staff in this unit to:

• prepare thoroughly for each teaching session; • be on time for each lecture, tutorial and laboratory session; • ensure that you understand the unit requirements and material; • be available to assist students during the consultation times (as indicated above); • treat you equitably, and with courtesy and respect; • report immediately, any issues or concerns related to student academic and non-academic

misconduct to the relevant authority, according to the UWS Misconduct Policy.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

7

Sometimes the best laid plans do go astray! In the unlikely occurrence of this happening, you will be notified about any changes to the scheduled activities, at least 24-hours in advance (if possible), via an announcement on vUWS.

8. How to use this learning guide

This Learning Guide supplements the Unit Outline and is designed to help you navigate through the unit. It will help you focus on what you need to do to prepare for the various assessment tasks throughout the unit. You should consult the Learning Guide on a regular basis, as you plan your study, as this guide contains information on how best to prepare for each assessment task.

The Learning Guide also offers tips to assist you in developing the skills and techniques of an effective, independent learner. However, if you have any particular problems or issues regarding this Unit, please take these up with the Unit Coordinator so that they may be resolved as soon as possible. As an adult learner, it is expected that you will be responsible for your own learning and take the necessary and appropriate steps to ensure your success.

9. Policy and how it affects you

The University has a number of policies that relate to teaching and learning. Important policies affecting students include

� Assessment Policy � Examinations Policy � Special Consideration Policy � Review of Grade Policy � Assessment Practice – Fundamental Code � Misconduct – Student Academic Misconduct Policy (see extract of the policy below under the

heading "What is Academic Misconduct?") � Misconduct – Student Non-academic Misconduct Policy � Enrolment Policy (includes a section on the UWS Student Email Account) � Bullying Prevention Policy and Guidelines � Sexual Harassment Prevention Policy

There are two policies that relate to misconduct – academic and non-academic misconduct. Breaches of these policies can have very serious consequences. It is essential that you are familiar with these policies and how to ovoid misconduct of any type.

What is Academic Misconduct? Academic Misconduct may involve plagiarism, collusion or cheating. Plagiarism involves submitting or presenting work in a unit as if it were the student's own work when, in fact, it was not. Collusion includes inciting, assisting, facilitating, concealing or being involved in plagiarism, cheating or other academic misconduct with others. Cheating includes dishonest conduct (or attempted dishonest conduct) in exams.

For the full definition of academic misconduct and the consequences of such behaviour, you are advised to read the Misconduct – Student Academic Misconduct Policy in its entirety, refer to: http://policies.uws.edu.au/view.current.php?id=00051

The School of Computing, Engineering and Mathematics definitions of Minor and Substantial Breaches of the UWS Academic Misconduct policy are below:

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

8

Plagiarism Minor breach: A minor breach occurs when the weighting of the assessment task is 10% or less, and 20% or less of the work submitted is taken from another source without reference to the original source or author. Substantial breach definition: A substantial breach occurs when: 1. Either the weighting of the assessment task is more than 10%, or 20% or more of the work submitted is taken from another source, without reference to the original source. 2. If a student has been found to have already committed an act of plagiarism and warned about it, whether it be a minor or substantial breach, then the next allegation will be treated as a substantial breach.

Cheating 1. Dishonest or attempted dishonest conduct during an examination, for example speaking to other candidates or otherwise communicating with them, leaving answer papers exposed for other students to view and/or copy or attempting to view another student’s solutions, would be deemed as minor. However, if this behaviour continued after the student had been asked to desist, then the breach would be treated as substantial. 2. Bringing into the examination room any textbook, notebook, memorandum, other written material or mechanical or electronic device (including mobile phones), or any item not authorised by the examiner would be treated as minor. However, if the student does not surrender the unauthorised item, then a substantial breach would have occurred. 3. Writing an examination or part of it, or consulting any person or materials outside the confines of the examination room without permission to do so, would constitute a substantial breach. 4. Cheating in take-home examinations, which includes, but it not limited to: making notes, papers or answers in connection with the examination (in whatever form) to others without the permission of the relevant lecturer; receiving answers, notes or papers in connection with the examination (in whatever form) from another student, or another source without the permission of the relevant lecturer; and the unauthorised collaboration with another person or student in the formulation of an assessable component of work constitutes a substantial breach.

Other Academic Misconduct 1. Tampering or attempts to tamper with examination scripts, class work, grades or class records, will be regarded as substantial. 2. Failure to abide by the directions of an academic member of staff regarding the individuality of work to be handed in, will, in the first instance be treated as minor. However, any reoccurrence of such behaviour will be regarded as substantial. 3. Acquisition, attempted acquisition, possession or distribution of examination materials or information without the authorisation of the academic member of staff will be regarded as substantial. 4. Impersonation of another student in an examination or other class assignment will be regarded as substantial. 5. Falsification or fabrication of practical or laboratory reports will be regarded as substantial. 6. Non-authorised use of tape recording of lectures will be regarded as minor, except where the student/s has been asked to desist and refuses to comply. This continued abuse will be regarded as substantial.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

9

There are many resources to help you avoid academic misconduct. The library staff can help you with referencing and the Student Learning Unit can assist with academic writing and plagiarism. If you are unsure about any of your work you should also ask your tutor or lecturer for advice and feedback.

What is Non-academic Misconduct? Non-academic misconduct includes unlawful activities and crimes, falsifying documents (like a medical certificate or academic records), harassing other students (or staff), stealing or damaging university property (like library books or computers) and disrupting other students or staff. These are just some of the types of non-academic misconduct and while these things are rare they do happen. If you believe you have been the victim of non-academic misconduct or you are aware of any academic misconduct it is very important that you report it.

10. What to do if you have a problem/concern

If you have a concern about this unit please contact the unit coordinator in the first instance. If you would prefer to speak to someone else you are advised to contact your Head of Program (see the online handbook to identify your Head of Program and their contact details http://handbook.uws.edu.au/hbook/).

More information about resolving complaints is available on the UWS website. http://uws.clients.squiz.net/opq/planning_and_quality/complaints_management_and_resolution

The University also has a confidential Complaints Handling department (see link above for contact details). You may contact this department of the University at any time however we would appreciate the opportunity to resolve this directly first.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

10

Teaching and Learning Activities

Details of the teaching resources and learning activities are provided in this section of the learning guide.

11. Schedule of Learning and Teaching Activities

The Autumn teaching session begins on 27th February 2012. The inter-session break begins on 16

th April

2012. There are two public holidays this semester, on the 9th and 25

th April 2012. All classes for this unit on

these two holidays, if pertinent, are to be cancelled.

Week Date Topics or Notes References Pracs

documents and library books

unit outline, learning guide, C++ references, extension form, staff contacts, assignment 1, assignment 2 ☀online textbook☀ miscellaneous (optional), sample assignments, another sample, tut solutions

1 27/2- introduction to computer systems; binary number; simplest C++ programs ( pdf )

Bronson:1, briefing,

history

none this week

2 5/3- data types, binary representation of integers, 2's complement (pdf )

Bronson:2, [P1]

3 12/3- variable declarations; read and assign values; typecasting ( pdf )

Bronson:3, 2.4 2.3 ;

Robertson:1,2

[P2]

4 19/3- basic program design; IPO diagram; pseudocode; selection, switch ( pdf )

Bronson:4; Robertson:3, 4

[P3]

5 26/3- loops in pseudocode and C++; different type of loops ( pdf )

Bronson:5 Robertson:5

[P4]

6 2/4- functions, variable scope, C++ libraries ( pdf ) Good Friday

Bronson:6; Robertson:6 mock quiz and answers

[P5]

7 9/4- Easter Monday. Mid-Semester Test is scheduled during the lecture. Those who already did Tutorial/Practical 5 may work on their assignment 1 during this week's practical. (assignment 1 due)

[P6] and also on assignment 1

8 16/4- INTRA-SESSION BREAK

9 23/4- Anzac Day (Wed 25/4): mini revision and consolidation ( pdf ) Optional challenge questions are available.

mini revision: some

may be done in pracs

partly the lecture and [P6]

10 30/4- algorithm development, modular design; IO streams; strings ( pdf ), or combined ( pdf )

Bronson:6; Robertson:8,9

complete [P6]

11 7/5- arrays; linear search; paired or parallel arrays; more on strings ( pdf )

Bronson:8.1-3,

8.7,7.1; 7.1-3, 7.7, 14.1

Robertson:7

[P7]

12 14/5- more modular design, stepwise refinement; translate design to code; sequential

Bronson:6; Robertson:8,9;

[P8]

Section

3

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

11

processing ( pdf ) JSP

13 21/5- binary search; struct; more on stream manipulators ( pdf )

Bronson:11, 8.7

16, 7.7 [P9]

14 28/5- unit revision and sample exercises (these slides will NOT be published!); (assignment 2 due)

Robertson:10 revision questions sample exam paper

[P10]

NOTE: denotes videos, denotes online drills, and denotes self-testing exercises. The

section numbers in this box refer to those that have been changed for the 4th edition.

For full details about the timetable for this unit, go to http://handbook.uws.edu.au/hbook/unit.aspx?unit=300580.2

Lectures

Lectures introduce key concepts and techniques in this unit. Students should attend lectures so that they are keeping up with the progression of a typical student. Students’ attention will be drawn to potential areas of difficulty and often issues related to assignments are mentioned as well. Experience suggests that students who score highly show high levels of attendance at lectures.

Tutorials

Tutorials are mixed with the practicals, as most tutorials are to be done through some of those practical questions. Tutorial/practical questions are designed to reinforce the concepts and techniques introduced in the previous week/s. These questions are also indicative of the types often used in the final examination. Tutorials provide a forum for students to discuss with one another, share the knowledge, answer questions, and interact with the teaching staff.

Labs

Lab exercises constitute mainly the practicals. Practical exercises will mainly provide students with hands-on experience working with the data types, input and output, conditional statements, loops, function construction and calling, as well as the use of arrays. These exercises will take the students to confront various common problems during development and implementation of a typical application program. Most lab exercises are designed for learning and practicing, and the solution or hints will mostly be discussed during the practical classes. Some tutorial/practical questions will be selected for the students to hand back for inspection in the same class a week after.

Online programming drills are available to students who can drill their basic programming skills both during and outside the practical classes.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

12

Assessment Information

This section provides detailed information about the assessment activities in this unit. You are encouraged to use this as a guide when you are working on each assessment task.

12. Assessment summary

There are 5 main assessment activities in this unit.

Tutorial/Practical Exercises

- attendance and performance: 9% - practice quizzes: 6%

15%

Assignment 1 10%

Assignment 2 15%

Mid-semester Test 10%

Final Examination 50%

Total Assessment 100%

The final examination is a compulsory component. A student will receive an AF (absent fail) grade if not attending the final exam. In order the pass this unit, a student must achieve an overall 50% or over along with completing all the compulsory components. Other grades will be determined according to the usual UWS grading scheme.

Final marks and grades are subject to confirmation by the School and potentially other relevant UWS assessment committees which may scale, modify or otherwise amend the marks and grades for the unit, as may be required by University policies.

Late Submission: A student who submits a late assessment without approval for an extension will be penalised by 10% per day up to 10 calendar days, i.e. marks equal to 10% of the assignment's weight will be deducted as a 'flat rate' from the mark awarded. For example, for an assignment that has a possible highest mark of 100, the student's awarded mark will have 10 marks deducted for each late day. Saturday and Sunday each also count as one day. Assessments will not be accepted after the marked assessment task has been returned to students who submitted the task on time.

Marks and Feedback: Since all written submissions will be electronic, and via vUWS, only marks and comments will be provided back to the students. They will be made available either electronically via vUWS, or in hardcopy during the designated practical classes.

Section

4

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

13

Assessment Extension: If students need to apply for a short extension of time to complete an assessment item, they should complete the Application for Extension of Time for Assignment form available on the Unit's website (vUWS) or from the School Office. This form needs to be submitted before the due date of the assignment. An application for an extension does not automatically mean that an extension will be approved.

13. Learning outcomes and assessment

Learning Outcomes

On the successful completion of this unit it is expected that you will be able to:

(list the learning outcomes below)

Assessment tasks

(map the assessment tasks to the learning outcomes below)

describe and explain the purposes and operations of the basic components of a computer and a computer system;

Tut/prac exercises, final exam, mid-semester test

discuss and explain the concepts of data and procedural representation, programming languages, compilers, interpreters, and development environments;

Tut/prac exercises, final exam, mid-semester test, assignment 1

from a simple problem description, identify desired inputs, outputs, and the necessary processing operations to convert input into output;

Tut/prac exercises, final exam, mid-semester test, assignments 1 and 2

design program logic using both graphical and pseudocode techniques that employ standard control structures of sequence, iteration, and selection;

Tut/prac exercises, final exam, mid-semester test, assignments 1 and 2

translate design structures into code in a high-level procedural language, verify the code, and devise and implement test plans to minimize occurrence of errors;

Tut/prac exercises, final exam, assignments 1 and 2

apply top-down modular design principles to programming problems and implement the solution in a high-level procedural language;

Tut/prac exercises, final exam, assignment 2

define and discuss the concepts of module coupling and cohesion, and design modular programming structures that employ sound parameter passing techniques for inter-modular communications.

Tut/prac exercises, final exam, assignment 2

Each of the assessment tasks has been designed to evaluate the extent to which you have achieved these learning outcomes.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

14

14. Assessment details

Topics breakdown in terms of grades

While it is generally not possible to precisely pinpoint which concept or technique is required to achieve a certain grade because the measurement is not quantum, the following table exhibits what topics are roughly associated with what grades for this unit. It approximately applies to all individual assessments too, although the extent of the knowledge at a later assessment item is generally more than that of an earlier assessment item.

This table is partly the guiding principle for the marking criteria and standards for all the assessment items.

Target Grades Topics

P C D H

General knowledge of computer systems; binary number; 2's complement

� � � �

Data types; variable declarations; assigning values; C++ strings; if-then-else statement

� � � �

Basic input and output; tabulating output; proper coding style and convention

� � � �

Effective use of while or for loops; simple function heading, writing and calling

� � � �

Program flow chart; IPO diagram � � � �

Basic modular design; nested loops; switch statements

� � �

Structure chart; basic desk-checking techniques; pseudocode

� � �

Variable scope, typecasting; different parameter passing methods for functions;

� � �

Simple arrays; linear search; sequential processing; passing an array to a function

� � �

Paired arrays; passing paired arrays to functions; sophisticated desk-checking

� �

C++ struct; pointers; sophisticated search and coding strategies; stream manipulators

Assessment task 1: Tutorial/practical exercises

Details of the assessment task

° Weekly attendance of, and performance in, the tut/prac classes (9%) - 1% for each week, recording both the attendance and the performance for the first 9 tutorials - A tutor will typically select part of the tutorial/practical questions for the students to complete before they leave the class so that the tutor can assess the class performance for each individual student. Solutions to some of the selected questions, hand-written by each student, will also be asked to hand back during the next tutorial/practical class.

° Practice quizzes (6%)

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

15

- 6 online practice quizzes, each to be done within the respective tutorial class or within the specified period of time, usually 1-2 weeks

- each practice quiz accounts for 1% - each online quiz can be done as many times as a student wishes, within the specified period, the mark for the last attempt will be officially recorded as the mark for the quiz.

Marking criteria and standards Marks for the tutorial and practical exercises are based on the correctness and the completeness of the student answers.

Annotated example See the textbook. Examples will also be discussed during the tutorials/practicals.

Submission details Students are to demonstrate their work during the practical classes, and hand back their solutions to the selected questions to the tutor in the next tut/prac class. Results for the online practice quizzes are automatically recorded.

Assessment task 2: Assignment 1

Details of the assessment task Assignment 1 is mainly on the number conversion, flow chart, desk checking, IPO diagram and pseudocode, and on the use of a number of basic programming techniques such as input/output, conditional statements, loops, function construction and calling.

Marking criteria and standards Marks for assignment 1 are based on the correctness and the completeness of the student answers. Details will be indicated in the text of the assignment on vUWS. Students need to know reasonably well the concepts and techniques individually in order to achieve a mark akin to a passing grade, and will need to know how to effectively integrate them together in order to achieve better marks.

Annotated example See the textbook. Sample past assignments and solutions will be made available via vUWS. Additional samples are also given below.

Additional example 1: For the C++ program listed below, draw the flow chart, and walk through (i.e. desk-check) the code for a typical monthlySales=25000.00.

#include <iostream> #include <iomanip> using namespace std; int main() { double monthlySales, income; cout << "Enter the value of monthly sales: "; cin >> monthlySales; if (monthlySales >= 50000.00) income = 375.00 + .16 * monthlySales; else if (monthlySales >= 40000.00) income = 350.00 + .14 * monthlySales;

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

16

else if (monthlySales >= 30000.00) income = 325.00 + .12 * monthlySales; else if (monthlySales >= 20000.00) income = 300.00 + .09 * monthlySales; else if (monthlySales >= 10000.00) income = 250.00 + .05 * monthlySales; else income = 200.00 + .03 * monthlySales; cout << setiosflags(ios::showpoint) << setiosflags(ios::fixed) << setprecision(2) << "The income is $" << income << endl; return 0; }

The flow chart for the above program can be written as:

All students with a mark akin to grade P or above should be able to draw the flow chart for conditional statements and simple loop structure, similar to the above answer, and students of better marks should be able to draw the flow charts describing more involved loops and programming logic.

The following desk-checks the C++ program as required:

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

17

All students with a mark akin to grade P or above should be able to walk through the basic C++ programs for sufficiently many steps, similar to the above answer, and students of better marks should be able to desk-check programs of a single main function of some programming complexity including in particular the use of loops.

Additional example 2: Write a C++ program that reads from keyboard 3 integer numbers, with proper input prompt, and then display the number that is neither the largest nor the smallest. You may assume that these 3 numbers are distinct in value, or consider a number not to be the largest (respectively, smallest) if there is another number which is larger (respectively, smaller) or equal in value.

One possible C++ program for the solution can be:

#include<iostream> using namespace std; int main() {

int a, b, c, middle; // prompt and input 3 integers from standard input cout << "Enter 3 integers separated by white spaces:"; cin >> a >> b >> c;

// the middle value of the 3 integers must be equal to // the value of either or b or c if (a>=b && b>=c || a<=b && b<=c) // covers the case when the middle value is equal // to that of variable b middle=b;

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

18

else // middle value must be equal to the value of either b or c if (a>=c && c>=b || a<=c && c<=b)

// covers the case when the middle value is equal to that of c middle=c;

else // covers the case when the middle value is equal to that of a middle=a;

// display the final results in a meaningful manner cout << "The middle value among ("

<< a << ", " << b << ", " << c << ") is " << middle << endl;

// following statement is optional // system("pause");

return 0;

}

All students with a mark akin to grade P or above should be able to solve questions of this level without any obvious problems. This should include the use of proper coding style, suitable variable types, meaningful variable names when necessary, consistent indentations, reasonable comments within the code, as well as the correctness of the program.

Additional example 3: Write a function getInterest prototyped by double getInterest(double base, double rate, int years); that calculates the accumulated amount of interest on the base amount at the interest rate rate for years number years. Mathematically, this accumulated interest can be represented by Interest = Base * (1 + Rate)

Years – Base. Then write a driver program that, for an initial amount of 10000

dollars and the annual interest rate 3.5%, calculate the total interest earned respectively for 1 to 10 years.

One possible C++ program for the solution can be:

#include<iostream> using namespace std; // function prototyping double getInterest(double, double, int); // main function int main() { const double RATE=0.035, BASE=1000; const int YEARS=10; double interest; // general message for the results cout << "For the inital amount " << BASE << " and interest rate " << RATE << ",\n" << "the total interests earned at the end of each year are:\n\n";

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

19

// display table heading cout << "YEAR\tINTEREST\n"; // calculate total interest at the end of each year for(int i=1; i<=YEARS; i++) { // get the total interest interest=getInterest(BASE, RATE, i); // display a tabulated line cout << i << "\t" << interest << endl; } // system("pause"); return 0; }

All students with a mark akin to grade P or above should be able to prototype and code a simple function that supports passing by values, and should know how to call such functions within another function. Students of better marks should use const variables accordingly for the program, utilize proper function prototype/s, proper use of functions that pass parameters by reference if pertinent, and write programs that are succinct and robust.

Additional example 4: Develop a Defining Diagram, and construct an algorithm in pseudo-code that reads a series of numbers, until a non-positive number (0, or negative number) is read, finds the largest among all those that are read, and displays the result.

The possible defining or IPO diagram, along with the possible pseudo-code, is given below:

DEFINING/IPO DIAGRAM INPUT PROCESSING OUTPUT ------------------------------------------------------------------------ number initialise maxValue to -1 maxValue (repeatedly) prompt for a number get a number update maxValue display pertinent messages display the maxValue

PSEUDOCODE MAINLINE SET maxValue to -1 DISPLAY 'Enter an integer (0 or negtive value to stop)' GET number DOWHILE number > 0 IF number > maxValue THEN SET maxValue = number ENDIF DISPLAY 'Enter an integer (0 or negtive value to stop)'

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

20

GET number ENDDO IF maxValue > 0 THEN DISPLAY 'The largest of all the numbers read is ', maxValue ELSE DISPLAY 'No possitive numbers are read.' ENDIF END

All students with a mark akin to grade P or above should be able to outline the IPO diagram reasonably well, and their pseudo-code should exhibit a reasonably meaningful structure. Students of better marks should be able to represent general algorithms with proper pseudo-code.

Submission details Students must submit assignment 1 electronically via vUWS before the due date. No email submissions will be accepted.

Assessment task 3: Assignment 2

Details of the assessment task Assignment 2 aims to utilize the skills gained in assignment 1, along with a few additional techniques such as the use of arrays, to go through a complete and concerted process of developing an application program in C++. It will lead the students in the first few steps in the program design, leaving the rest to be completed by the students.

Marking criteria and standards Marks for assignment 2 are based on the correctness and the completeness of the student answers. Details will be indicated in the text of the assignment on vUWS.

Annotated example See the textbook. Sample past assignments and solutions will be made available via vUWS. Since the integration of various concepts and techniques is essential for this assignment, we need to avoid potentially misleading students with isolated component examples, as necessitated by the scope of this guide. Hence these examples will have to be moved to the unit website.

Submission details Students must submit assignment 2 electronically via vUWS before the due date. No email submissions will be accepted.

Assessment task 4: Mid-semester Test

Details of the assessment task All aspects covered in lectures and tuts/practicals up until (but not including) the week in which the mid-semester test takes place, are examinable.

Annotated example A sample test paper with sample questions will be made available via vUWS. Sample multiple choice questions will also be made available via practice quizzes. A good portion of the questions for the mid-semester test may come directly from these practice quizzes.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

21

Submission details The mid-semester test will be in the form of multiple choice questions only, and will be held at the regular lecture theatre for each campus during the week for the mid-semester test, starting at the regular lecture time.

Assessment task 5: Final Examination

Details of the assessment task All aspects covered in lectures and tuts/practicals are examinable. The final exam will typically contain multiple choice questions as well as written answer questions.

Sample papers A sample final examination paper will be made available via vUWS.

Submission details The final examination will be held in the scheduled period at the end of the semester.

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

22

Assignment Cover Sheet School of Computing, Engineering and Mathematics

Student Name

Student Number

Unit Name and Number

Tutorial Group

Tutorial Day and Time

Lecturer/Tutor

Title of Assignment

Length

Due Date

Date Submitted

Campus Enrolment

DECLARATION

I hold a copy of this assignment that I can produce if the original is lost or damaged.

I hereby certify that no part of this assignment/product has been copied from any other student’s work or from any other source except where due acknowledgement is made in the assignment. No part of this assignment/product has been written/produced for me by another person except where such collaboration has been authorized by the subject lecturer/tutor concerned. I hereby certify that I have read and understand what the School of Computing, Engineering and Mathematics defines as minor and substantial breaches of misconduct as outlined in the learning guide for this unit. Signature: ……………………………………………………………………….

Note: An examiner or lecturer/tutor has the right not to mark this assignment if the above

declaration has not been signed)

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

23

Learning Resources and Information

As independent learners you must make choices about the resources you use to help you with your learning activities and assessments in this unit. In the following section we briefly summarize the resources that are available to you.

15. Overview of learning resources

The following table is a quick look-up guide that summarizes the learning resources available in this unit.

Resources Tut/Practical work Assessments Final Exam

Unit Coordinator/ teaching team

Yes Yes Yes

Library See the library home page to get help from a Librarian http:// library.uws.edu.au/

Search Central is a great Library resource that will help you find information for this assessment http:// library.uws.edu.au/

See the library home page to get help from a Librarian http:// library.uws.edu.au/

e-learning tools vUWS vUWS vUWS

Textbook Yes Yes Yes

Revision Guide N/A Sample questions and solutions or hints

Yes

Participation in class

Yes Yes Yes

Reading Lists Schedule page at vUWS and more detail at the end of the lecture notes

Schedule page at vUWS and more detail at the end of the lecture notes

Schedule page at vUWS and more detail at the end of the lecture notes

Section

5

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

24

16. People who can help

Teaching Team The campus lecturers are already listed in the Staff Details section. Other tutors will be made available in the due course.

Librarians See http://library.uws.edu.au/ and consult your campus library directly.

17. Useful reading

Essential Textbook Bronson, G.J. (2006) A First Book of C++ From Here to There, 3rd Ed, Thomson Learning. Or alternatively, Bronson, G.J. (2012) A First Book of C++, 4th Ed, CENGAGE Learning.

Optional Additional Textbook Robertson, L.A. (2007) Simple Program Design, 5th Ed, Thomson Learning.

18. Online Resources

vUWS vUWS provides a range of essential online resources in this unit. You are encouraged to check the site regularly for updates. In particular, you will find websites that will help you with the C++ standards and the various programming techniques and examples, see http://staff.scm.uws.edu.au/~zhuhan/pf2012/main.html, and the links there.

Software Resource - Free DEV C++ complier download: http://www.bloodshed.net/dev/devcpp.html - Free Code::Block C++ compiler download: http://www.codeblocks.org/

Wikipedia Wikipedia can be a great help with initial information on some topics.

19. UWS website – Current Students

The “Current Students” page of the UWS web site http://www.uws.edu.au/students contains many important links, including:

� Managing your study – This site contains much of the information necessary for the administration of your course throughout your study at UWS. http://www.uws.edu.au/currentstudents/current_students/managing_your_study

� Getting help – This site is a useful resource for students and a hub for coordinating developments to improve your university experience. http://www.uws.edu.au/currentstudents/current_students/getting_help

3 0 0 5 8 0 P R O G R A M M I N G F U N D A M E N T A L S

25

� e-learning – This is your entry to all aspect of e-learning at UWS, including this unit’s vUWS site. http://www.uws.edu.au/students/onlinesupport:

� Students with a disability should visit: http://www.uws.edu.au/currentstudents/current_students/getting_help/disability_services

� Policies – This site includes the full details of policies that apply to you as a UWS student. http://www.uws.edu.au/policies/a-z

20. Referencing Requirements

Normally, in this unit, the assessment tasks will not require referencing. However, if an assessment task does require referencing for you, then examples of some referencing styles are available on the library website http://library.uws.edu.au/citing.php .