Computer Software vs. Hardware. Topic: Java in the Computer World.

Slides:



Advertisements
Similar presentations
Programming Concepts What we are going to learn in this subject? The basic concepts of writing computer programs commonly known as software.
Advertisements

Designing a Program & the Java Programming Language
Senem Kumova Metin Introduction to Programming CS 115 Introduction to Computing PART I : Computer Basics PART II: Introduction to Computing/Programming.
 2003 Prentice Hall, Inc. All rights reserved. 1 Chapter 1 – Introduction to Computers and C++ Programming Outline 1.6 Machine Languages, Assembly Languages,
Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Starting Out with Programming Logic & Design First Edition by Tony Gaddis.
Wednesday, 9/4/02, Slide #1 1 CS 106 Intro to CS 1 Wednesday, 9/4/02  Today: Introduction, course information, and basic ideas of computers and programming.
Three types of computer languages
1 Lecture 1  Getting ready to program  Hardware Model  Software Model  Programming Languages  The C Language  Software Engineering  Programming.
Java Environment (CSS444)
Introduction to Computer Programming CSC 1401: Introduction to Programming with Java Lecture 2 Wanda M. Kunkle.
Chapter 1 Introduction to C Programming. 1.1 INTRODUCTION This book is about problem solving with the use of computers and the C programming language.
 2003 Prentice Hall, Inc. All rights reserved. 1 Machine Languages, Assembly Languages, and High-level Languages Three types of computer languages 1.Machine.
COMP 14: Intro. to Intro. to Programming May 23, 2000 Nick Vallidis.
Intro to Programming CST JavaScript. Objectives Define software Identify the different types of software Differentiate the different types of programming.
CSE 1301 J Lecture 2 Intro to Java Programming Richard Gesick.
 2000 Prentice Hall, Inc. All rights reserved. 1 Introduction to Computers and C Programming Outline Introduction What Is a Computer? Computer Organization.
Introduction to computers and programming RIZWAN REHMAN Assistant Professor Centre For Computer Studies.
Activity 1 - WBs 5 mins Go online and spend a moment trying to find out the difference between: HIGH LEVEL programming languages and LOW LEVEL programming.
Introduction to Computers and Python. What is a Computer? Computer- a device capable of performing computations and making logical decisions at speeds.
Chapter Introduction to Computers and Programming 1.
COMPUTER SCIENCE I C++ INTRODUCTION
“C” Programming Language What is language ? Language is medium of communication. If two persons want to communicate with each other, they have to use.
 2008 Pearson Education, Inc. All rights reserved Introduction to Computers, the Internet and World Wide Web.
COMPUTER SOFTWARE Section 2 “System Software: Computer System Management ” CHAPTER 4 Lecture-6/ T. Nouf Almujally 1.
Simple Program Design Third Edition A Step-by-Step Approach
Lecture 1 Introduction to computers & VB.Net. What is a Computer? Examples? A device capable of  Performing computation  Making logical decisions 
An intro to programming. The purpose of writing a program is to solve a problem or take advantage of an opportunity Consists of multiple steps:  Understanding.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming.
Programming 1 1. Introduction to object oriented programming and problem-solving.
An Introduction to Computers August 12, 2008 Mrs. C. Furman.
What is a Computer? An, electrical machine, that can be programmed to accept data (input), process it into useful information (output) and store it away.
Computer Programming I. Today’s Lecture  Components of a computer  Program  Programming language  Binary representation.
UniMAP Sem1-08/09EKT120: Computer Programming1 Week 1 – Lecture 1.
Session One Introduction. Personal Introduction Role of programmers Robot Examination HUD & HID Uploading Code.
UNIT - 1Topic - 3. Computer software is a program that tells a computer what to do. Computer software, or just software, is any set of machine-readable.
TMF1013 : Introduction To Computing Lecture 1 : Fundamental of Computer ComputerFoudamentals.
C++ Programming Language Lecture 1 Introduction By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
Lecture 2 Object Oriented Programming Basics of Java Language MBY.
Introduction to Computer Systems and the Java Programming Language.
© Copyright 1992–2004 by Deitel & Associates, Inc. and Pearson Education Inc. All Rights Reserved. 1 Introduction to Computers Outline 1.1Introduction.
1 CISC181 Introduction to Computer Science Dr. McCoy Lecture 1 February 8, 2005.
Computer Components.
INTRODUCTION Kingdom of Saudi Arabia Princess Nora bint Abdul Rahman University College of Computer Since and Information System CS240.
1 MIS 131 Introduction to Algorithms and Programming 2015/2016 Fall - Chapter 1 -
1 Programming Fundamentals How to Program in C++ How to Program in C++
COMPUTER PROGRAMMING. Computer programming the objective of the module to gain the necessary skills to develop a computer program using one of the high.
What is Programming? A program is a list of instructions that is executed by a computer to accomplish a particular task. Creating those instructions is.
CHAPTER 1 INTRODUCTION 1 st Semester H King Saud University College Of Applied Studies and Community Services CSC 1101 Computer Programming-1.
C o n f i d e n t i a l 1 Course: BCA Semester: III Subject Code : BC 0042 Subject Name: Operating Systems Unit number : 1 Unit Title: Overview of Operating.
Spring 09- ICE0124 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 1.
CS2301:Computer Programming 2
Overview Object oriented programming How to run a simple program.
Chapter 1 Getting Acquainted With Computers, Programs, and C++
How Are Computers Programmed? CPS120: Introduction to Computer Science Lecture 5.
UniMAP Sem2-10/11 DKT121: Fundamental of Computer Programming1 Introduction to C – Part 1.
Spring 2009 Programming Fundamentals I Java Programming XuanTung Hoang Lecture No. 8.
The Development Process Compilation. Compilation - Dr. Craig A. Struble 2 Programming Process Problem Solving Phase We will spend significant time on.
COP 2551 Introduction to Object Oriented Programming with Java Topics –Introduction to the Java language –Code Commenting –Java Program Structure –Identifiers.
1.1: Objects and Classes msklug.weebly.com. Agenda: Attendance Let’s get started What is Java? Work Time.
Chapter 1 An Overview of Computers and Programming Languages.
Copyright © 2012 Pearson Education, Inc. Chapter 1: Introduction to Computers and Programming Dr. Halla Abdel Hameed.
Introduction to Computer Programming using Fortran 77.
1 Types of Programming Language (1) Three types of programming languages 1.Machine languages Strings of numbers giving machine specific instructions Example:
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
Introduction to Computer Programming Concepts M. Uyguroğlu R. Uyguroğlu.
By Kundang K Juman Hardware & Software. COMP102 Prog. Fundamentals I: Software / Slide 2 l Four components of a computer system: n CPU - central processing.
Key Ideas from day 1 slides
System Programming and administration
Intro to Programming Week # 1 Hardware / Software Lecture # 2
Computer Programming-1 CSC 111
Presentation transcript:

Computer Software vs. Hardware

Topic: Java in the Computer World

Programming languages High-level languages: –single statements could be written to accomplish substantial tasks. Assembly languages: –English-like abbreviations; –elementary operations Machine languages: –1's and 0's; –machine-dependent Machine language : Assembly language High-level language

Example (Programming languages) Machine languages: Assembly languages: LOAD BASEPAY ADD OVERPAY STORE GROSSPAY High-level languages: grossPay = basePay +overTimePay

Java Software Development Environment You can have 4 separate parts: –Editor –Compiler –Interpreter –Debugger Or you can combine some of these parts

Integrated Development Environment (IDE) IDE combins –editor, compiler, interpreter and debugger IDE is a tool for developing software This course is not about IDE This course is about designing software

Where is Java in the compter world? -- section summary Machine language : Assembly language High-level language

Topic: Object Oriented Design Classes Methods

Classes = Classification = The classification process Classification is good Classification takes places in everyday life Classes

Classes -- How to classify Example object group ==>classes –class monitor (output device) –class printer (output device) –class speaker (output device) –class computer tower (computing device) –class keyboard (input device) –class mouse (input device) Classes

Class and Object Relation An object is an instance of a class A class represents a category of objects Class monitorClass printer obj Classes

Class and method relation Classes

Why Different Classes? Classes Good thing about such modular design: –Independent objects ==>local problem only Example –bad keyboard, but everything else is still working fine –Easy to find problems –try a new keyboard --> find out the old keyboard is bad –Easy to fix problems –buy a new keyboard for $15 –If the system does not have such modular design we’d be in trouble.

Sub-class Classes A big class might have sub-classes Good vs. bad classification Example: make sub-classes for books in a bookstore –Good classification: literature, arts, science, religion, sports, home, map… –Bad classification: alphabetically order books: section A,B,C...

About Class: section summary Classes We have learned –Classification is good classification = categorization –(motivated why we want to split things into classes –Good classification vs. bad classification –Sometimes, a class has sub-classes

About Class: section summary (continue…) Classes Also, we have learned... –An object is an instance of a class –A method is inside of a class Class monitor obj

Methods Each method belongs to a class A class can have many methods

Make Methods (Example) Methods Example: make up some methods for the printer class What does the printer do? –Let’s draw a flow chart...

Methods

Flow chart --> Methods Flow chart –help us to think through –breaks big task to smaller sub-tasks –small sub-tasks ==> methods Each method is an action Now, we are ready to write the skeleton of “class printer”... methods

// // class Printer // class Printer { // // define variables // boolean double_sided; // The variable "double_sided" // as type "boolean", so it can // take only values "true" or "false". int maximum_memory_size; // The maximum size of the memory // is an integer. Type "int"=integer. // // Method: receive_file // DOES: Receive files to be printed. // void receive_file() { //... // We don't know how to program the method yet. } methods

About Methods: section summary In this section, we learned that –A class consists of many/some methods –A class might have methods to handle some tasks –Break a big task into small sub-tasks –method = sub-tasks (manageable sub-tasks) –often, mehtods ==> an action methods

Topic Summary: Class and method Class classification class modular design class = (method) + (method) +… big task = (small sub-task) + (small sub-task) +... Methods small sub-task We are happy -- that we designed a nice schematic Printer class.

Programming process ideas Program text, on paper or in head Work done at the keyboard with a text editor Program text, in a file such as Test.java Compiler-- a program for translating programs Program in Java byte code, in the file Test.class Java Virtual Machine JVM, executes the program Test.class