240 likes | 384 Views
Visual Basic Introduction. IDS 306 from Shelly, Cashman & Repede Microsoft Visual Basic 5: Complete Concepts and Techniques. Processing. Parallel Processing -- more than one CPU (each with its own memory); able to carry out more than one instruction at a time
E N D
Visual Basic Introduction IDS 306 from Shelly, Cashman & Repede Microsoft Visual Basic 5: Complete Concepts and Techniques
Processing • Parallel Processing -- more than one CPU (each with its own memory); able to carry out more than one instruction at a time • Multitasking -- one processor, moves back and forth between programs
Graphical User Interface (GUI) Design • Should be under user’s controluser should be able to customize • Form should follow function • Use concepts and metaphors familiar to user; parallel real-world experience • Visually and functionally consistent • Immediate feedback • Attempt to prevent user mistakes
Program Development Life Cycle (PDLC) Methodology -- organized plan that breaks process into steps • Analyze the problem • Design the problem • Code the program • Test and debug program • Formalize solution • Maintain the program
Hierarchical Input Process Output (HIPO) Chart • A.k.a. hierarchy chart or top-down chart • Represents subdivision of activities visually • Lowest level instruction -- procedure p. I.7
Flow Chart • Process Symbol • Input/Output (I/O) • Flowline • Annotation • Decision • Terminal • Connector • Predefined Process p. I.7
Major Constructs of Structured Programming • Control Structures • Sequence • Selection • Case • Repetition • Do…While • Do…Until
Control Structures • Sequence Control Structure -- used to show a single action or one action followed in order (sequentially by another) • Selection Control Structure -- used to tell the program which action to take based on a certain condition • Case Control Structure -- form of selection that allows for more than two alternatives
Control Structures (cont.) • Repetition Control Structure -- a.k.a. looping or iteration; used when a set of actions is performed repeatedly • Do...While loop repeats as long as condition is true (may never execute) • Do...Until loop evaluates condition at end of the loop (will always execute at least once) • Nested Control Structure -- contained within other control structures
Object-Oriented Programming (OOP) • Object -- anything real or abstract, about which you store both data and operations that manipulate the data • Class -- an implementation that can be used to create multiple objects with the same attributes and behavior • Object is and Instance of a Class
Generalization Hierarchy • Object-oriented design tool used to show the relationships among classes of objects p. I.11
Object-Oriented Terms • Attribute -- identifying characteristics of individual objects, such as name or color • Operation -- an activity that reads or manipulates the data of an object; called service in OOD, in OOP called a method • Message -- has two parts: name of object to which message is sent, name of operation that will be performed. In OOP called event
Object Structure Diagram p. I.12
Event Diagram p. I.13 • Used to represent relationships among events and operations • Operations shown in rounded rectangles • Events shown on lines with arrows
Major Constructs of OOP • Encapsulation • Inheritance • Polymorphism
Encapsulation • Capability of an object to have data (properties) and functionality (methods) available to the user without the user having to understand the implementation within the object • Also called information hiding • Process of hiding the implementation details of an object from its user
Inheritance • A descendent class (subclass) that differs from its superclass in only one way contains just the code or data necessary to explain the difference • Also known as subclassing
Polymorphism • Allows an instruction to be given to an object in a generalized rather than specific detailed command • Same command will get different but predictable results depending on object receiving command • Specific actions, internal to object differ, results are the same
Rapid Application Development (RAD) • Use of prebuilt objects to make program development much faster • Shorter development life cycles • Easier maintenance • Capability to reuse components
Benefits of OOP • Reusability -- classes designed to be reused in many systems or create modified classes using inheritance • Stability -- classes designed for repeated reuse, become stable over time • Easier Design -- object is a black box • Faster Design -- can be created from existing components
Prototyping • Process where developers iterate between refining the specifications and building working models of the system
Visual Basic • Properties -- attributes of objects • Controls -- check boxes, list boxes, etc. • Forms -- windows that contain application’s controls • Events -- messages or requests for service • Procedures -- operations or services • include methods, functions, subroutines
Creating VB Applications • Create the interface • Set the properties • Write the code