Class 0: Review and Perspective. cis 335 Fall 2001 Barry Cohen Class info n Barry Cohen n n Office hours: W 3:15-4:40.

Slides:



Advertisements
Similar presentations
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Advertisements

CIS 101: Computer Programming and Problem Solving Lecture 8 Usman Roshan Department of Computer Science NJIT.
1 Introduction to Software Engineering Lecture 42 – Communication Skills.
If You Missed Last Week Go to Click on Syllabus, review lecture 01 notes, course schedule Contact your TA ( on website) Schedule.
Class 1: What this course is about. Assignments Reading: Chapter 1, pp 1-33 Do in Class 1: –Exercises on pages 13, 14, 22, 28 To hand in in Class 2: –Exercises.
Guide To UNIX Using Linux Third Edition
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
Principles of Procedural Programming
Programming Introduction to C++.
Data Structures and Programming.  John Edgar2.
PRINCIPLES OF PROGRAMMING Revision. A Computer  A useful tool for solving a great variety of problems.  To make a computer do anything (i.e. solve.
Introduction to High-Level Language Programming
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Software.
1 Programming and Problem Solving — Software Engineering (Read Chap. 2)
Programming and Problem Solving — Software Engineering (Read Chap. 2) 1.
Introduction to C++ Programming Introduction to C++ l C is a programming language developed in the 1970's alongside the UNIX operating system. l C provides.
Java Language and SW Dev’t
Goals of Course Introduction to the programming language C Learn how to program Learn ‘good’ programming practices.
Programming Lifecycle
The Java Programming Language
Program A computer program (also software, or just a program) is a sequence of instructions written in a sequence to perform a specified task with a computer.
Announcements  If you need more review of Java…  I have lots of good resources – talk to me  Use “Additional Help” link on webpage.
Documentation and Comments. What’s a comment? A comment is a simple form of documentation. Documentation is text that you the programmer write to explain.
Computer Programming TCP1224 Chapter 3 Completing the Problem-Solving Process and Getting Started with C++
School of Computer Science & Information Technology G6DICP - Lecture 9 Software Development Techniques.
Problem of the Day  Why are manhole covers round?
Bilgisayar Mühendisliği Bölümü CENG 102 – Computer Programming Melek OKTAY Syllabus Administrative Information.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Class 1: What this course is about. Assignment Read: Chapter 1 Read: Chapter 1 Do: Chapter 1 ‘workbook’ pages not finished in class Do: Chapter 1 ‘workbook’
C++ Basics C++ is a high-level, general purpose, object-oriented programming language.
1 BUILDING JAVA PROGRAMS CHAPTER 2 Pseudocode and Scope.
The basics of the programming process The development of programming languages to improve software development Programming languages that the average user.
Review Binary Numbers Bit : 0 or 1 Byte: 8 bites 256 different values 2 8 KB : 1024 bytes 2 10 bytes MB : 1024 * 1024 bytes 2 10 * 2 10 (2 20 ) bytes GB.
Control Structures (B) Topics to cover here: Sequencing in C++ language.
Scientific Computing Home Assignment #1 Dr. Guy Tel-Zur.
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 1: Introduction Data.
EGR 115 Introduction to Computing for Engineers Branching & Program Design – Part 1 Monday 29 Sept 2014 EGR 115 Introduction to Computing for Engineers.
CSC 107 – Programming For Science. Science Means Solving Problems  Physics – How does an atom work?
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
The Hashemite University Computer Engineering Department
Written by: Dr. JJ Shepherd
11 Introduction to Object Oriented Programming (Continued) Cats.
C++ Basics Programming. COMP104 Lecture 5 / Slide 2 Introduction to C++ l C is a programming language developed in the 1970s with the UNIX operating system.
CS 367 Introduction to Data Structures Charles N. Fischer Fall s367.html.
CSCI 161 Lecture 3 Martin van Bommel. Operating System Program that acts as interface to other software and the underlying hardware Operating System Utilities.
CS Class 04 Topics  Selection statement – IF  Expressions  More practice writing simple C++ programs Announcements  Read pages for next.
Functions Commands Programming Steps Examples Printing Homework Hints.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
Chapter 3 Introducing Java. Objectives and Goals 1. Define terminology associated with object- oriented programming. 2. Explain why Java is a widely used.
Introduction to Algorithmic Processes CMPSC 201C Fall 2000.
Chapter 2- Visual Basic Schneider1 Chapter 2 Problem Solving.
CHAPTER 3 COMPLETING THE PROBLEM- SOLVING PROCESS AND GETTING STARTED WITH C++ An Introduction to Programming with C++ Fifth Edition.
COP 3503: Programming Fundamentals for CIS Majors 2 Basics.
Lecture 1 Data Structures Aamir Zia. Introduction Course outline Rules and regulations Course contents Good Programming Practices Data Types and Data.
ICS 3UI - Introduction to Computer Science
Key Ideas from day 1 slides
About the Presentations
Programming Problem steps must be able to be fully & unambiguously described Problem types; Can be clearly described Cannot be clearly described (e.g.
Understand the Programming Process
Problem Solving Techniques
Introduction to Data Structures
Chapter 1: Computer Systems
Chapter 1 Introduction(1.1)
CSC128 FUNDAMENTALS OF COMPUTER PROBLEM SOLVING
Understand the Programming Process
Learning Intention I will learn about evaluating a program.
Programming Introduction to C++.
Fundamental Programming
FOR statement a compact notation for a WHILE e.g. sumgrades = 0;
Presentation transcript:

Class 0: Review and Perspective

cis 335 Fall 2001 Barry Cohen Class info n Barry Cohen n n Office hours: W 3:15-4:40 F 4:00-5:25 n n Text: Irvine, C++ And Object- Oriented Programming n Recommended: Schildt, C++ the Complete Reference

cis 335 Fall 2001 Barry Cohen Grading n 35% homework n 30% midterm n 35% final

cis 335 Fall 2001 Barry Cohen Homework n Include the following F student name F student ID F date F class and section F homework number n Homework must be handed in on or before the due date. Multiple pages must be stapled together. n You must hand in source code and program output. Programs must compile in VC++.

cis 335 Fall 2001 Barry Cohen Honesty policy n You may discuss class content and assignments with others. You may not present someone else’s work as your own. Any instance of cheating will be disciplined under NJIT rules.

cis 335 Fall 2001 Barry Cohen HW 0 n Due: Sept 13, 2002 n p 20, problems 1,2,3 n p 54, problem 1

cis 335 Fall 2001 Barry Cohen Life Cycle of a Program n Specification. Analyze and describe the problem. n Design. Choose your data structures and algorithms. n Coding. Translate the design into the programming language of your choice. n Debugging. Squash those pesky beasties. Test and squash some more. n Maintenance. More bug fixes. Add more features. Make friendlier and more efficient.

cis 335 Fall 2001 Barry Cohen What’s a Good Solution? n Correctness. Solve the problem that’s been posed. n Robustness. Handle the unexpected. n Modularity. Make it logical and reusable. n Clarity. Think clearly. Explain your thinking. n Can be maintained and extended.

cis 335 Fall 2001 Barry Cohen How to document n Precondition. Where are you starting from. n Invariant. What stays the same as you progress. n Progress. Show you’re not going in circles. n Post condition. Where you need to end up. n Use asserts.

cis 335 Fall 2001 Barry Cohen Pseudocode n High level summary n One line for each ‘idea’ n Example 1: ‘Read the initialization files’ n Example 2: ‘Perform a topological sort’

cis 335 Fall 2001 Barry Cohen Flowcharts n Make the logic visible. n Stop or start n Decide n Do

cis 335 Fall 2001 Barry Cohen Use Functions n A function is a unit of code. n The one-page rule. n Keep data private. n Clearly define inputs and outputs.

cis 335 Fall 2001 Barry Cohen Programming Style n Consistent indentation. Use white space. n Document. Give yourself credit. Use comments. n Descriptive names. Follow name conventions.

cis 335 Fall 2001 Barry Cohen Why Document? n Someone will read it - beginning with you. n Programs live longer than programmers. n Tells you where you need to go.

cis 335 Fall 2001 Barry Cohen Quick Review of C n Data types. int, double, char. C++: bool n Data structures. Arrays.

cis 335 Fall 2001 Barry Cohen Control Structures n if.. else n for loop n while loop n do loop n switch.. case

cis 335 Fall 2001 Barry Cohen Scope n Auto u Declared in function u Allocated on stack n Static u Declared outside function u Declared as static u Allocated permanently

cis 335 Fall 2001 Barry Cohen Pass by reference n In C++, you can pass by reference n Example: void swap(int & a, int & b) { int temp = x; x = y; y = temp; }

cis 335 Fall 2001 Barry Cohen Stream I/O Stream output: int n = 65; cout << n; Stream input: int n; cin >> n;

cis 335 Fall 2001 Barry Cohen Comments n Two kinds of comments /* This is a multiline comment. */ int n; // 1-line comment

cis 335 Fall 2001 Barry Cohen C, C++ n C++ is ‘C with classes’ n Class groups object with operations n Object is instance of a class n Example: class coin n Attributes: value, upside n Actions: flip, getValue