Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.

Slides:



Advertisements
Similar presentations
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Advertisements

Lecture 1: Overview of Computers & Programming
Copyright © 2002 W. A. Tucker1 Chapter 1 Lecture Notes Bill Tucker Austin Community College COSC 1315.
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
Starting Out with C++, 3 rd Edition 1 Chapter 1. Introduction to Computers and Programming.
COSC 120 Computer Programming
Chapter 1: An Overview of Computers and Programming Languages J ava P rogramming: From Problem Analysis to Program Design, From Problem Analysis to Program.
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
©The McGraw-Hill Companies, Inc. Permission required for reproduction or display. slide 1 CS 125 Introduction to Computers and Object- Oriented Programming.
The Analytical Engine Module 6 Program Translation.
©TheMcGraw-Hill Companies, Inc. Permission required for reproduction or display. COMPSCI 125 Introduction to Computer Science I.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Introduction to Computers and Programming. Some definitions Algorithm: –A procedure for solving a problem –A sequence of discrete steps that defines such.
Computers: Tools for an Information Age
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages C++ Programming:
About the Presentations The presentations cover the objectives found in the opening of each chapter. All chapter objectives are listed in the beginning.
Topic 1: Introduction to Computers and Programming
Introduction to Computers and Programming. Some definitions Algorithm: Algorithm: A procedure for solving a problem A procedure for solving a problem.
Starting Out with C++: Early Objects 5/e © 2006 Pearson Education. All Rights Reserved Starting Out with C++: Early Objects 5 th Edition Chapter 1 Introduction.
C++ Crash Course Class 1 What is programming?. What’s this course about? Goal: Be able to design, write and run simple programs in C++ on a UNIX machine.
COMPUTER PROGRAMMING. Introduction to C++ History Merges notions from Smalltalk and notions from C The class concept was borrowed from Simular67 Developed.
Microsoft Visual Basic 2005 CHAPTER 1 Introduction to Visual Basic 2005 Programming.
CS102 Introduction to Computer Programming
Principles of Programming Chapter 1: Introduction  In this chapter you will learn about:  Overview of Computer Component  Overview of Programming 
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
1 Chapter-01 Introduction to Computers and C++ Programming.
Alternate Version of STARTING OUT WITH C++ 4 th Edition Chapter 1 Introduction to Computers and Programming.
Chapter Introduction to Computers and Programming 1.
CSC 125 Introduction to C++ Programming Chapter 1 Introduction to Computers and Programming.
Programming Languages: Telling the Computers What to Do Chapter 16.
Chapter 1 An Overview of Computers and Programming Languages.
Introduction to Programming Lecture Number:. What is Programming Programming is to instruct the computer on what it has to do in a language that the computer.
GENERAL CONCEPTS OF OOPS INTRODUCTION With rapidly changing world and highly competitive and versatile nature of industry, the operations are becoming.
UNIVERSITI TENAGA NASIONAL “Generates Professionals” CHAPTER 4 : Part 2 INTRODUCTION TO SOFTWARE DEVELOPMENT: PROGRAMMING & LANGUAGES.
General Computer Science for Engineers CISC 106 Lecture 02 Dr. John Cavazos Computer and Information Sciences 09/03/2010.
Chapter 1: Introduction to Computers and Programming.
Copyright © 2009 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 1: Introduction to Computers and Programming.
Computer Programming Basics Assistant Professor Jeon, Seokhee Assistant Professor Department of Computer Engineering, Kyung Hee University, Korea.
Computer Concepts 2014 Chapter 12 Computer Programming.
C++ Programming: From Problem Analysis to Program Design, Third Edition Chapter 1: An Overview of Computers and Programming Languages.
Basic of Programming Language Skill Area Computer System Computer Program Programming Language Programmer Translators.
Introduction to Computer Application (IC) MH Room 517 Time : 7:00-9:30pm.
Module 4 Part 2 Introduction To Software Development : Programming & Languages Introduction To Software Development : Programming & Languages.
1.
Programming in C++ Dale/Weems/Headington Chapter 1 Overview of Programming and Problem Solving.
Chapter 4 Software. Chapter 4: Software Generations of Languages Each computer is wired to perform certain operations in response to an instruction. An.
Chapter 1 Computers, Compilers, & Unix. Overview u Computer hardware u Unix u Computer Languages u Compilers.
Chapter 1 : Overview of Computer and Programming By Suraya Alias
Computer and Programming. Computer Basics: Outline Hardware and Memory Programs Programming Languages and Compilers.
Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design.
Chapter 1 An Overview of Computers and Programming Languages.
PROGRAMMING FUNDAMENTALS INTRODUCTION TO PROGRAMMING. Computer Programming Concepts. Flowchart. Structured Programming Design. Implementation Documentation.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition Chapter 1: An Overview of Computers and Programming Languages.
Chapter 1: Introduction to Computers and Programming.
1 Chapter 1 Background Fundamentals of Java: AP Computer Science Essentials, 4th Edition Lambert / Osborne.
Software Engineering Algorithms, Compilers, & Lifecycle.
PROGRAMMING (1) LECTURE # 1 Programming and Languages: Telling the Computer What to Do.
Victoria Ibarra Mat:  Generally, Computer hardware is divided into four main functional areas. These are:  Input devices Input devices  Output.
Programming Logic and Design Seventh Edition Chapter 1 An Overview of Computers and Programming.
Introduction to computer software. Programming the computer Program, is a sequence of instructions, written to perform a specified task on a computer.
Chapter 1: An Overview of Computers and Programming Languages
CSCI-235 Micro-Computer Applications
Introduction to Visual Basic 2008 Programming
Overview of Computers and Programming Chapter 1
ICS103 Programming in C Lecture 1: Overview of Computers & Programming
Chapter 1: An Overview of Computers and Programming Languages
C++ Programming: From Problem Analysis to Program Design
Computers: Hardware and Software
Programming Logic and Design Eighth Edition
Presentation transcript:

Chapter 1: Introduction to Visual Basic.NET: Background and Perspective Visual Basic.NET Programming: From Problem Analysis to Program Design

Visual Basic.NET Programming: From Problem Analysis to Program Design2 Objectives Learn basic computer terminology and component architecture Explore the history of programming languages Recognize the similarities between programming languages and spoken languages Solve problems and develop algorithms

Visual Basic.NET Programming: From Problem Analysis to Program Design3 Objectives (continued) Identify basic object-oriented programming concepts Examine the benefits of the object-oriented approach

Visual Basic.NET Programming: From Problem Analysis to Program Design4 Understanding Basic Computer Terminology And Component Architecture Understand basic computer terms Fundamentals of how computer works Computer requires: Hardware Software

Visual Basic.NET Programming: From Problem Analysis to Program Design5 Understanding Basic Computer Terminology And Component Architecture (continued) Hardware –Physical components of computer Architecture –Arrangement of hardware components within computer

Visual Basic.NET Programming: From Problem Analysis to Program Design6

7 Understanding Basic Computer Terminology And Component Architecture (continued) Primary computer components: –Input/output devices –Memory Read-only memory (ROM) Random access memory (RAM)

Visual Basic.NET Programming: From Problem Analysis to Program Design8 Understanding Basic Computer Terminology And Component Architecture (continued) Primary computer components (continued): –Central processing unit Registers Arithmetic logic unit (ALU) Control unit Software –Computer programs that are executed by hardware

Visual Basic.NET Programming: From Problem Analysis to Program Design9 Exploring the History of Programming Languages Modern programming languages –Very powerful –Enable you to develop sophisticated applications with relative ease –Bear little resemblance to early counterparts HOWEVER, principal underpinnings remain unchanged

Visual Basic.NET Programming: From Problem Analysis to Program Design10 Machine Language Earliest programming languages Consist of only 0’s and 1’s Bit –Binary digit of either 0 or 1 –At machine level, computers only truly understand bits Bit patterns –Used to represent other pieces of information Example: characters

Visual Basic.NET Programming: From Problem Analysis to Program Design11 Machine Language (continued) Memory location –Can be represented as binary number using combination of bits

Visual Basic.NET Programming: From Problem Analysis to Program Design12

Visual Basic.NET Programming: From Problem Analysis to Program Design13 Assembly Language Provides one-to-one correspondence between each machine language instruction and a mnemonic Mnemonic –Word or character string that represents an instruction Requires writing set of single-step instructions Easier for people to read and write

Visual Basic.NET Programming: From Problem Analysis to Program Design14 Assembly Language (continued) Sample instructions: –CLR Clear the accumulator –ADD A Add the contents of memory location A to the accumulator –SUB G Subtract the contents of memory location G from the accumulator –STO E Store the contents of the accumulator in memory location E

Visual Basic.NET Programming: From Problem Analysis to Program Design15 Assembly Language (continued) Assembler –Translates mnemonics and memory location names into underlying machine code Program written for one computer architecture –Usually will not run on different computer architecture –Drawback of assembly language

Visual Basic.NET Programming: From Problem Analysis to Program Design16 High-level Languages Evolved due to needs for: –Portability –More expressive languages Easier to read, write, and maintain Less efficient in terms of: –CPU time –Memory

Visual Basic.NET Programming: From Problem Analysis to Program Design17 High-level Languages (continued) Compiler –Translate program to machine code Linker –Combines object code with other programs in class libraries Loader –Loads object code into memory –Executes program

Visual Basic.NET Programming: From Problem Analysis to Program Design18 High-level Languages (continued) Source code –Program written by programmer Class library –Collection of object files –Support features and functions of a high-level language

Visual Basic.NET Programming: From Problem Analysis to Program Design19

Visual Basic.NET Programming: From Problem Analysis to Program Design20 Learning a Programming Language Understand basic vocabulary Keywords –Words built into language –Also called reserved words Statements –Consist of: Keywords Identifiers Symbols

Visual Basic.NET Programming: From Problem Analysis to Program Design21 Learning a Programming Language (continued) Procedures –One or more related statements –Work together to perform specific task Modules –Self-sufficient group of related procedures –Can combine with other modules to create applications

Visual Basic.NET Programming: From Problem Analysis to Program Design22 Learning a Programming Language (continued) Syntax –Rules of language –Includes: Spelling Punctuation Grammar –Each programming language has own unique syntax and structure

Visual Basic.NET Programming: From Problem Analysis to Program Design23 Learning a Programming Language (continued) Syntax error –Mistake in program Violates language rules –Compiler checks for syntax errors

Visual Basic.NET Programming: From Problem Analysis to Program Design24 Learning a Programming Language Logic error –Mistake in program Executes and produces incorrect result –Also known as bugs –Not checked by compiler

Visual Basic.NET Programming: From Problem Analysis to Program Design25 Solving Problems and Developing Algorithms Computer programming is problem solving Problems solved by programs –Require inputs –Produce outputs Algorithm –Sequence of steps used to transform input(s) into desired output(s)

Visual Basic.NET Programming: From Problem Analysis to Program Design26

Visual Basic.NET Programming: From Problem Analysis to Program Design27 Solving Problems and Developing Algorithms (continued) Critical that programmers embrace problem- solving approach Before writing code, programmer must: –Understand problem at hand –Properly identify inputs and outputs –Develop transformation algorithm

Visual Basic.NET Programming: From Problem Analysis to Program Design28 Example 1-1: Creating a GPA Algorithm Set TotalPoints,TotalHours, and GPA equal to 0 For each course Get Grade and CreditHours Add CreditHours to TotalHours If Grade is an ‘A’, multiply CreditHours by 4 and add result to TotalPoints If Grade is a ‘B’, multiply CreditHours by 3 and add result to TotalPoints

Visual Basic.NET Programming: From Problem Analysis to Program Design29 Example 1-1: Creating a GPA Algorithm (continued) If Grade is a ‘C’, multiply CreditHours by 2 and add result to TotalPoints If Grade is a ‘D’, multiply CreditHours by 1 and add result to TotalPoints When no more courses If TotalHours is not 0, calculate GPA = TotalPoints/TotalHours

Visual Basic.NET Programming: From Problem Analysis to Program Design30 Solving Problems and Developing Algorithms (continued) Desk-checking: –Draw columns by hand that correspond to items in algorithm –Create set of test data –Step through algorithm –Record changing values for each item

Visual Basic.NET Programming: From Problem Analysis to Program Design31 Example 1-2: Desk-Checking the Algorithm

Visual Basic.NET Programming: From Problem Analysis to Program Design32 Example 1-2: Desk-Checking the Algorithm (continued)

Visual Basic.NET Programming: From Problem Analysis to Program Design33 Identifying Basic Object-oriented Programming Concepts Procedural programming –Defining set of steps to transform inputs into outputs –Translating steps into code Object-oriented programming –Defining collection of objects that work together to solve problem

Visual Basic.NET Programming: From Problem Analysis to Program Design34 Identifying Basic Object-oriented Programming Concepts (continued) Object-oriented programming languages: –Becoming more popular –Examples: Java VB.NET Object –Thing that has characteristics and behaviors

Visual Basic.NET Programming: From Problem Analysis to Program Design35 Identifying Basic Object-oriented Programming Concepts (continued) Attributes –Characteristics of an object Methods –Behaviors of an object Problem domain objects –Objects specific to problem being solved

Visual Basic.NET Programming: From Problem Analysis to Program Design36

Visual Basic.NET Programming: From Problem Analysis to Program Design37 Identifying Basic Object-oriented Programming Concepts (continued) Message –Asks object to invoke one of its methods Encapsulation –Attributes and methods of object are packaged into single unit –Do not need to know internal structure of object to send messages to it

Visual Basic.NET Programming: From Problem Analysis to Program Design38 Identifying Basic Object-oriented Programming Concepts (continued) Class –Defines what all objects of group have in common Instance –Specific member of group –Example: Cheeseburger is an instance of food class

Visual Basic.NET Programming: From Problem Analysis to Program Design39 Identifying Basic Object-oriented Programming Concepts (continued) Inheritance –Class of objects takes on characteristics of another class Extends them as necessary –Subclasses –Superclass

Visual Basic.NET Programming: From Problem Analysis to Program Design40

Visual Basic.NET Programming: From Problem Analysis to Program Design41 Identifying Basic Object-oriented Programming Concepts (continued) Polymorphism –Different objects can respond in own way to same message –Related to inheritance of methods

Visual Basic.NET Programming: From Problem Analysis to Program Design42 Examining the Benefits of the Object-oriented Approach Advantages: –Naturalness –Reusability OO approach still requires algorithm design: –To define methods of object

Visual Basic.NET Programming: From Problem Analysis to Program Design43 Summary Computer consists of: –Hardware –Software Programming languages: –Machine language –Assembly language –High-level languages

Visual Basic.NET Programming: From Problem Analysis to Program Design44 Summary (continued) Writing a program: –Understand problem –Develop algorithm –Desk-check –Write code Object-oriented programming –Defines a collection of objects that work together to solve a problem