120 likes | 229 Views
Explore the fundamentals of algorithm design in COMP 110 with a focus on encapsulation, polymorphism, and inheritance. Learn to write algorithms in pseudocode and understand key programming concepts. Stay updated with homework assignments and upcoming sessions.
E N D
COMP 110Designing Programs Tabitha Peck M.S. January 16, 2008 MWF 3-3:50 pm Philips 367 1
Announcements • Office Hours • After Class Today • Come if you don’t have jGRASP working • Textbook 2
Questions? • Why 8 bits in a byte? • Any other questions? 3
Writing Algorithms in pseudocode Encapsulation, polymorphism, and inheritance Variables, arguments, statements, and syntax Today in COMP 110 4
Algorithm • A set of instructions for solving a problem 5
Pseudocode • combination of code and English used to express an algorithm before writing algorithm into code 6
Vocabulary • Variables - store a piece of data • Statements - instructions to the computer • Syntax - grammar rules for a language • Arguments - information methods need to carry out its action 7
Encapsulation (Information Hiding) • packing things up, only seeing part of what is going on 8
Polymorphism • “many forms” • Same instruction to mean same thing in different contexts. 9
Inheritance • way of organizing classes. • At each level classification becomes more specialized. Sandwich Bread Sub Salami Meatball PB&J Turkey 10
Homework • Program 1 is on the web page • We will look at code in recitation that will help you
Friday • Recitation (bring charged laptop) • Lab 1 • Programming help for Program 1 12