Example: bankruptcy

Practical C++ Programming Teacher's Guide - Oualline

Practical C++ProgrammingTeacher's GuideIntroductionThis Guide is designed to help with the classroom presentation of the material in Pracctical C++ Programming . It contains a set of Teacher's notes for each chapter which give you information aboutthe key concepts covered in the chapter as well some ideas for in-class live demonstration section alrets you to the live programs available for demonsration in is also a set of review questions for each chapter with answers. (The Quiz document containsthese questions without answers.) Hopefully this Guide will make your teaching of C++ a little easier.

Practical C++ Programming Teacher's Guide Introduction This guide is designed to help with the classroom presentation of the material in Pracctical C++

Tags:

  Guide, Programming, Practical, Teacher, Practical c programming teacher s guide

Information

Domain:

Source:

Link to this page:

Please notify us if you found a problem with this document:

Other abuse

Transcription of Practical C++ Programming Teacher's Guide - Oualline

1 Practical C++ProgrammingTeacher's GuideIntroductionThis Guide is designed to help with the classroom presentation of the material in Pracctical C++ Programming . It contains a set of Teacher's notes for each chapter which give you information aboutthe key concepts covered in the chapter as well some ideas for in-class live demonstration section alrets you to the live programs available for demonsration in is also a set of review questions for each chapter with answers. (The Quiz document containsthese questions without answers.) Hopefully this Guide will make your teaching of C++ a little easier.

2 Table of ContentsChapter 1: What is C++?..3 Chapter 2: The Basics of Program 3: 4: Basic Declarations and 5: Arrays, Qualifiers, and Reading 6: Decision and Control Statements ..19 Chapter 7: The Programming 8: More Control 9: Variable Scope and Functions ..27 Chapter 10: The C++ 11: Bit 12: Advanced Types ..38 Chapter 13: Simple 14: More on 15: Simple 16: File 17: Debugging and 18: Operator 19: Floating 20: Advanced 21: Advanced 22: 23: Modular 24: 25: Standard Template 26: Program 27: Putting It All 28: From C to C++..68 Chapter 29: C++ s Dustier 29: Programming Adages.

3 71 Supplement: From C to C++..72 Page 2 Chapter 1: What is C++?Profanity is the one language that all programmers understand. -- Anon. teacher s NotesThis chapter is designed to give students some idea of where C++ fits in the world of programing. You might want to take this opportunity to tell your class about your personal experience with C++. Forexample, when did you first encounter the language, what where you doing with it, how did it make yourlife better? This is also the time to acquaint the students with what the course is going to cover and what is expectedof them. Good style and Programming practices are stressed in this book.

4 I ve gone through a lot of otherpeople s code and am a fanatic about creating simple, readable programs. I grade 60% on style and 40% on function. Style covers things like, Is the program readable? Is itsimple and easy to understand? Are there comments at the beginning of each function? Are therecomments after each variable declaration? and so covers whether or not the program works and works this is the time to acquaint the students with the local computing facilities. They should knowwhere the machines are and where to go for class.

5 A set of data and the functions that work on that data. are the computers that are to be used for homework for this course? compiler are we using for this course?Page 3 Chapter 2: The Basics ofProgram WritingThe first and most important thing of all, at least for writers today, is to strip language clean, to lay itbare down to the bone. Ernest Hemingway teacher s NotesIn this chapter we give students an idea of what a Programming language is. We try to give students anidea of the work done to translate a high-level programing language into an executable , we have a section that describes in extreme detail the steps needed to run a compiler.

6 Fourspecific compilers, Borland-C++, Microsoft Visual C++ .NET, GNU s g++, and a generic UNIX CCcompiler, are require precise instructions in order to work. We start by introducing the students to alanguage they probably already know: English. Even with English, precise instructions are hard languages have evolved over the years. In the beginning everyone programed in machinelanguage. This evolved through assembly language, higher level language, the C language, to the C++language. This chapter gives a brief description of each of these the students are introduced to the tools used to create programs.

7 At this point I suggest that you tellthe students the absolute minimum needed to actually use the tools and no more. After that they caneither learn by reading the manual or you can give little ten minute mini-lectures at the beginning offuture for now they need to know only how to use the editor, compiler, linker, and the make utility. If theyare Programming in DOS or Microsoft Windows, a short tour of the various components of theIntegrated Development Environment is in this point it would be good to demonstrate creating a program. I suggest that you deliberately includea mistake.

8 This gives you a chance to show the students what an error message looks like and how tocorrect the chapter is finished the students should be able to type in a program and get it to run. Theprogram won t be understandable to the student at this point, but it will be enough to get something DemonstrationSlide 13 4 Classroom Presentation SuggestionsBefore the class, go through the slides and remove any Compiling the program using .. slides that donot pertain to your local you are using a commerical compiler (Borland, Microsoft), check the slides to make sure thatinformatioin them is still with the slide on Construction Tools (Slide 9) you may want to demonstrate the creation of anactual program.

9 Show how to edit, compile, get an error, edit again, compile, and run a this lecture, the class should adjourn to the computer lab where they will type in their first programunder the watchful eye of the instructor. This is the time they will need the most hand-holding as theywill make a large number of simple errors trying to get the compiler to Machine Language. A language consisting of a series of numbers. These numbers represent the actualinstructions used by the computer. Easy for computers to understand, but very difficultfor humans. Assembly Language. A language in which a single instruction translates directly into a single machineinstruction.

10 Source code. The high level code written by the programmer. In a high-level language, the source codeis usually machine independent. object code. The source code after it has been translated into machine language. library. A collection of generally useful procedures available to the programmer linker. A program that combines one or more object files with a set of libraries and produces anexecutable program. executable program. A machine dependent file that contains all the instructions necessary to perform a task. is assembly language different from machine language?Machine language is solely numbers.


Related search queries