200 likes | 306 Views
MIS 131 Introduction to Algorithms and Programming 201 8 /201 9 Fall - Chapter 0 -. Outline. Introduction What Is a Computer? Computer Organization Machine Languages, Assembly Languages and High-level Languages Software Deveopment Java Programming Language. What is a Computer?.
E N D
MIS 131Introduction to Algorithms and Programming2018/2019 Fall- Chapter 0 -
Outline • Introduction • What Is a Computer? • Computer Organization • Machine Languages, Assembly Languages and High-level Languages • Software Deveopment • Java Programming Language
What is a Computer? • Computer • Device capable of performing computations and making logical decisions • Computers process data under the control of sets of instructions called computer programs • Hardware • Various devices comprising a computer • Keyboard, screen, mouse, disks, memory, CD-ROM, and processing units • Software • Programs that run on a computer
Software • System programs • Operating systems • Microsoft 7,10, Unix, Lnix, Android, IOS • Utility programs - Compilers and interpreters • C,C++,Java compilers • QBasic interpreter • Application Programs • LOGO - accounting program • SPSS - statistics program • Minecraft – game program • Registration program
Six logical units in every computer: • Input unit • Obtains information from input devices (keyboard, mouse) • Output unit • Outputs information (to screen, to printer, to control other devices) • Memory unit • Rapid access, low capacity, stores input information • Arithmetic and logic unit (ALU) • Performs arithmetic calculations and logic decisions • Central processing unit (CPU) • Supervises and coordinates the other sections of the computer • Secondary storage unit • Cheap, long-term, high-capacity storage • Stores inactive programs
Three Types of Programming Languages • Machine languages • Assembly languages • High-level languages
Machine languages • Strings of numbers giving machine specific instructions • Natural language of the computer • 0-1 corresponding to high or low voltage • Instructions and data are encoded into binary numbers • Example: • 100111001011 • 110010100110 • 001011100101
Assembly languages • English-like abbreviations representing elementary computer operations (translated via assemblers) • Example: LOAD BASEPA ADD OVERPAY STORE GROSSPAY
High-level languages • Codes similar to everyday English • Use mathematical notations (translated via compilers) • Example: grossPay = basePay + overTimePay if (grade < 50) status = “failed” while (number <= 10)
grossPay = basePay + overTimePay • one line of a programm • Variables • grossPay • basePay • overTimePay • Onces compiled turn into machine code • after loading each instuction and data has an adress in main memory of the computer • executing the sum instruction • basePay and overTimePay has values they are summed and assigned to grossPay
Problem solving Meaning of computer programming Problem programmer
machine language compiler interpreter high level languages QBasic, C,C++,Java,VB.NET programmer natural languages Turkish English
What CPU does • Reading data or instructions from main memory • Performing aritmetic operations • Addition, multiplication , division,… • Performing logical opertations • Comparing numbers • They are equal, one is lsss then the other • Moving results of operation back to main memory
Steps of Software Development • Problem definition • Analysing the problem • Development of algorithm, pseudocode and flow chart • Programming • Testing the program • Deployment of the program
The text books • Java How to Program, 10th or higher Editions • Late Object Version • by Deitel & Deitel • Pearson • Starting out with Programming Logic and Design • 2ed Eddition • by Tony Gaddis • Pearson
Version of Java • Java 2 Enterprise Edition (J2EE) • Java 2 Micro Edition (J2ME) • J2SE Development Kit (JDK)
Two Styles of Programming • Structured programming MIS 131 • Introduce structured programming with a pure object oriented language Lava • Object oriended programing MIS 132 • Basic object oriented programming • Object oriented capabilities of Java
History of Java • Java by Sun Microsystems in 1991 team leader: James Gosling • 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.)
MIS 131 • web page: • misprivate.boun.edu.tr/badur/MIS131 • You can find: • Lecture slides • Requirements: weights • Exam schedule • Anounsements • Homework sets • Old quizes and exam questions