Home | Résumé | Courses | Contact | Useful Links | Favorite Links | USC - Homepage


Introduction to Programming - (CPTR125) - Lectures  


 Return to Courses | Course Content  



Introduction to Computer Programming (CPTR 125)

by David Siguelnitzky, MIS; MTE

JAVA - Lecture 1 - Version 2.0

Introduction to Computers & Java Programming

 


Lecture Outline

    - What Is a Computer?
    - Computer Organization
    - Evolution of Operating Systems
    - Personal, Distributed and Client/Server Computing
    - Machine Languages, Assembly Languages and High-Level Languages
    - History of C++
    - History of Java
    - Java Class Libraries
    - FORTRAN, COBOL, Pascal and •Ada - BASIC, Visual Basic, Visual C++, C# and .NET
    - The Internet and the World Wide Web
    - Basics of a Typical Java Environment
    - Thinking About Objects: Introduction to Object Technology and the Unified Modeling Language
    - Discovering Design Patterns: Introduction

 

What is a Computer?


Computers:
    - Performs computations and makes logical decisions
    - Millions / billions times faster than human beings
 

Computer programs:


    - Sets of instructions for which computer processes data
 

Hardware


    - Physical devices of computer system
 

Software


    - Programs that run on computers

 

 

Computer Organization
 

•Six logical units of computer system
    1– Input unit
        • Mouse, keyboard
    2– Output unit
        • Printer, monitor, audio speakers
    3– Memory unit
        • Retains input and processed information
    4– Arithmetic and logic unit (ALU)
        • Performs calculations
    5– Central processing unit (CPU)
        • Supervises operation of other devices
    6– Secondary storage unit
        • Hard drives, floppy drives

 

Evolution of Operating Systems
 

Batch processing
    – One job (task) at a time
    – Operating systems developed
• Programs to make computers more convenient to use
• Switch jobs easier

Multiprogramming
    – “Simultaneous” jobs
    – Timesharing operating systems

 

Personal, Distributed & Client/Server Computing
 

Personal computing
    – Computers for personal use
Distributed computing
    – Computing performed among several computers
Client/server computing
    – Servers offer common store of programs and data
    – Clients access programs and data from server
 


Machine Languages, Assembly Languages & High-Level Languages


•Machine language
    – “Natural language” of computer component
    – Machine dependent
 

• Assembly language
    – English-like abbreviations represent computer operations
    – Translator programs convert to machine language
 

• High-level language
    – Allows for writing more “English-like” instructions
 

• Contains commonly used mathematical operations
    – Compiler convert to machine language
 

• Interpreter
    – Execute high-level language programs without compilation

 

History of C++


•C++
    – Evolved from C
 

• Evolved from BCPL and B
    – Provides object-oriented programming capabilities
 

• Objects
    – Reusable software components that model real-world items



History of Java


•Java
    – Originally for intelligent consumer-electronic devices
    – Then used for creating Web pages with dynamic content
    – Now also used for:
        • Develop large-scale enterprise applications
        • Enhance WWW server functionality
        • Provide applications for consumer devices (cell phones, etc.)

 

 

Java Class Libraries
 

•Classes
    – Include methods that perform tasks
 

• Return information after task completion
    – Used to build Java programs
 

• Java contains class libraries
    – Known as Java APIs (Application Programming Interfaces)

FORTRAN, COBOL, Pascal and Ada


•FORTRAN
    – FORmula TRANslator
 

• COBOL
    – COmmon Business Oriented Language
 

• Pascal
    – Structured programming
 

• Ada
    – Multitasking


 

BASIC, Visual Basic, Visual C++, C# and .NET
 

•BASIC
    – Beginner’s All-Purpose Symbolic Instruction Code
 

• Visual Basic .NET
    – Framework Class Library (FLC)
 

• Visual C++
    – Microsoft Foundation Classes (MFC)
 

• C#
    – C-Sharp
 

• .NET
    – .NET platform

 

The Internet and the World Wide Web
 

•Internet
    – Developed more than four decades ago
    – Originally for connecting few main computer systems
    – Now accessible by hundreds of millions of computers
 

• World Wide Web (WWW)
    – Allows for locating/viewing multimedia-based documents

 

 

Basics of a Typical Java Environment
 

Java programs normally undergo five phases:


    1– Edit
        • Programmer writes program (and stores program on disk)


    2– Compile
        • Compiler creates byte codes from program


    3– Load
        • Class loader stores byte codes in memory


    4– Verify
        • Verifier ensures byte codes do not violate security requirements


    5– Execute
        • Interpreter translates byte codes into machine language

 


Fig. 1.1 A typical Java Environment


Discovering Design Patterns: Introduction


•Effective design crucial for large programs


• Design patterns
    – Proven architectures for developing object-oriented software
 

• Architectures created from accumulated industry experience
    – Reduce design-process complexity
    – Promotes design reuse in future systems
    – Helps identify common design mistakes and pitfalls
    – Helps design independently of implementation language
    – Establishes common design “vocabulary”
    – Shortens design phase in software-development process
 

•Design patterns
    – Similar to architectural elements
    – Used by developers to construct sets of classes and objects
 

• Developers
    – Familiarity with patterns to understand how to use patterns

 


                    Source: Java: How to Program - 5th Edition -Deitel & Deitel



 Return to Courses | Course Content  


 Home | Résumé | Courses | Contact | Useful Links | Favorite Links | USC - Homepage