Presentation is loading. Please wait.

Presentation is loading. Please wait.

Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel CO 204 Object Oriented Programming 2003 Trent University Kate Gregory.

Similar presentations


Presentation on theme: "Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel CO 204 Object Oriented Programming 2003 Trent University Kate Gregory."— Presentation transcript:

1 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel CO 204 Object Oriented Programming 2003 Trent University Kate Gregory

2 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Agenda About Me Administrivia Overview Intro to C++

3 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Class Times 3:00 – 5:00 Lecture –Usually break around 4:00 for 10-15 minutes 5:00 – 5:50 Tutorial –Less formal, more one-on-one –Save non-urgent questions for this hour

4 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Web Site www.gregcons.com/204 Lecture PowerPoints –Usually available before class Companion Word and Excel documents –Assignments, handouts –Please email me if you need HTML versions of these Announcements of test dates and other information of interest Reminder of my phone numbers and email

5 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Administrivia Text: Harvey M. Deitel, Paul J. Deitel. C++ How to Program, 3rd Edition. Office Hours : Before and after class and by appointment downtown Web Support : www.gregcons.com/204 kate@gregcons.com anytime Grading Scheme: 7 Labs – 35%, Midterm – 25%, Final – 40%

6 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Course Schedule

7 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Labs and Assignments 7 Labs, each worth 5% Typically each will be drawn from end-of- chapter exercises in text One lab may cover several weeks of material Each is due one week after it is handed out Late penalties HURT

8 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Marking Labs A working program does not mean a perfect mark Comment your code meaningfully Make sure your code solves the problem you were given Hand in whatever “extras” are requested such as problem statement, sample output Some marks are allotted for test techniques

9 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Overview – Topics Covered Introduction to C++ Control Structures Functions Arrays Pointers Strings Classes Data Abstraction Operator Overloading Inheritance Virtual Functions Polymorphism Stream IO Templates Exceptions File IO

10 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Design vs Coding You will learn how to code a feature, such as inheritance You will not learn how to decide whether a system should use the feature Design is CO 362 Most paid programmers start as coders and are allowed to design later You will learn the benefits and advantages of these language features.

11 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel History: C Evolved by Ritchie from two previous programming languages, BCPL and B –Used to develop UNIX –Used to write modern operating systems –Hardware independent (portable) –By late 1970's C had evolved to "Traditional C" Standardization –Many slight variations of C existed, and were incompatible –Committee formed to create a "unambiguous, machine- independent" definition –Standard created in 1989, updated in 1999

12 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel History: C++ Superset of C developed by Bjarne Stroustrup at Bell Labs "Spruces up" C, and provides object-oriented capabilities Object-oriented design very powerful –10 to 100 fold increase in productivity Dominant language in industry and academia

13 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Files in C++ foo.cpp – source code foo.h – header file –Typically.h files are included into source files Source files are each compiled into obj files Several obj files are linked into an exe –Sometimes a lib file is linked in also The exe can be executed, or run Extensions and naming conventions may vary

14 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Important times Compile Time Link Time Run Time When is something known? When does an error happen? When is a decision made?

15 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel C++ Gotchas Case Sensitive: if and IF are different You must declare variables You must initialize variables Ignores line breaks: you must mark ends of lines with ; Compiler does not read indents Brace brackets {} are sometimes optional: use them anyway

16 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Strongly Typed All variables in C++ have a type –int,char, float, etc int i = 3.4; float f = “Hello”; The compiler is your friend

17 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel The main() function This is what the operating system runs: // Everybody’s first program #include int main() { cout << "Hello, Trent!" ; return 0; }

18 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel Learning Already Function { } –Indenting styles #include cout << return Historical allusions: Unix, foo, Hello World

19 Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel For Next class Read Chapters 1, 2, and 3 of text Ensure you know how to use the C++ compiler in the lab or on your own computer (the text comes with a copy of Visual C++.)


Download ppt "Monday, Jan 6, 2003Kate Gregory with material from Deitel and Deitel CO 204 Object Oriented Programming 2003 Trent University Kate Gregory."

Similar presentations


Ads by Google