Java Programming Introduction

Slides:



Advertisements
Similar presentations
Operating Systems Components of OS
Advertisements

Install Chromium OS PC’s for Tiwi Island College.
Objectives Overview Define an operating system
CSCE 145: Algorithmic Design I Chapter 1 Intro to Computers and Java Muhammad Nazmus Sakib.
Chapter 5 Operating Systems. 5 The Operating System When working with multimedia, the operating system is perhaps the most important, the most complex,
Java.  Java is an object-oriented programming language.  Java is important to us because Android programming uses Java.  However, Java is much more.
COMP 14 Introduction to Programming
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
Professor Michael J. Losacco CIS 1150 – Introduction to Computer Information Systems System Software Chapter 4.
Digital Graphics and Computers. Hardware and Software Working with graphic images requires suitable hardware and software to produce the best results.
Lesson 4 Computer Software
Hardware vs. Software Computer systems consist of both hardware and software. Hardware refers to anything you can physically touch. Keyboards, mice, monitors,
Introduction 1-1 Introduction to Virtual Machines From “Virtual Machines” Smith and Nair Chapter 1.
INTRODUCTION SOFTWARE HARDWARE DIFFERENCE BETWEEN THE S/W AND H/W.
INVITATION TO COMPUTER SCIENCE, JAVA VERSION, THIRD EDITION Chapter 6: An Introduction to System Software and Virtual Machines.
Operating System What is an Operating System? A program that acts as an intermediary between a user of a computer and the computer hardware. An operating.
School of Computer Science & Information Technology G6DICP Introduction to Computer Programming Milena Radenkovic.
Module 2 : Part 1 INTRODUCTION TO HARDWARE & SOFTWARE INTRODUCTION TO HARDWARE & SOFTWARE.
Processes Introduction to Operating Systems: Module 3.
10/8: Software What is software? –Types of software System software: Operating systems Applications Creating software –Evolution of software development.
A compiler is a computer program that translate written code (source code) into another computer language Associated with high level languages A well.
A. Frank - P. Weisberg Operating Systems Structure of Operating Systems.
I NTRODUCTION TO N ETWORK A DMINISTRATION. W HAT IS A N ETWORK ? A network is a group of computers connected to each other to share information. Networks.
By: Cheryl Mok & Sarah Tan. Java is partially interpreted. 1. Programmer writes a program in textual form 2. Runs the compiler, which converts the textual.
Chapter 9 Operating Systems Discovering Computers Technology in a World of Computers, Mobile Devices, and the Internet.
Introduction TO Network Administration
Chapter 2 – Part 1 Introduction To Windows Operating Systems CMPF 112 : COMPUTING SKILLS.
I NTRODUCTION TO N ETWORK A DMINISTRATION. W HAT IS A N ETWORK ? A network is a group of computers connected to each other to share information. Networks.
System Programming Basics Cha#2 H.M.Bilal. Operating Systems An operating system is the software on a computer that manages the way different programs.
CS 177 Recitation Week 1 – Intro to Java. Questions?
ITP 109 Week 2 Trina Gregory Introduction to Java.
نظام المحاضرات الالكترونينظام المحاضرات الالكتروني Computer Software.
UNIX U.Y: 1435/1436 H Operating System Concept. What is an Operating System?  The operating system (OS) is the program which starts up when you turn.
CIT 140: Introduction to ITSlide #1 CSC 140: Introduction to IT Operating Systems.
The Basics of Android App Development Sankarshan Mridha Satadal Sengupta.
Chapter 1: Introduction to Computers and Programming
DISCOVERING COMPUTERS 2018 Digital Technology, Data, and Devices
Computer System Structures
OPERATING SYSTEM CONCEPTS AND PRACTISE
The Post Windows Operating System
Chapter 5 Operating Systems.
Android Mobile Application Development
CSC235 Computer Organization & Assembly Language
What Do Computers Do? A computer system is
Installing Java on a Home machine
Java Programming: From the Ground Up
Visit for more Learning Resources
Selected topic in computer science (1)
Computational Thinking, Problem-solving and Programming: General Principals IB Computer Science.
Operating System.
System Software EIT, © Author Gay Robertson, 2016.
CSCI-235 Micro-Computer Applications
Chapter 2: Operating-System Structures
Lecture 1: Introduction to JAVA
COMPUTER ORGANIZATION & ASSEMBLY LANGUAGE
Introduction
Java programming lecture one
Mobile Handset Virtual Machine
Installing Java on a Home machine
Computer Science I CSC 135.
Chapter 2: System Structures
Nat 4/5 Computing Science Operating Systems
Introduction CSC 111.
Programming Languages
Introduction to Virtual Machines
Example of an early computer system. Classification of operating systems. Operating systems can be grouped into the following categories: Supercomputing.
Introduction to Virtual Machines
Review of Previous Lesson
Programming language translators
Chapter 3 Software.
Presentation transcript:

Java Programming Introduction Phil Tayco San Jose City College Slide version 1.0 September 4, 2018

Introduction Why are we here? What is your interest in learning to program? What is a computer program? How does a computer know how to execute your program instructions? What is a programming language? Why learn Java?

Introduction Computer program fundamentals Learning how a program works fundamentally requires a basic understanding of 2 major components: hardware and software Hardware is the physical: desktop, laptop, mobile device, smart TV, rocket ship, ... Software is the virtual: app, operating system, user interface, menus, … The 2 are co-dependent Hardware has little use without software to have it do something useful Software cannot be useful without some physical machine to run on

Introduction Computer architecture Off the assembly line, a computer is essentially a machine with a system of controlled electrical currents Control is primarily handled by the Central Processing Unit (CPU) Programs are instructions written in machine language executed by the CPU Programs reside in the computer’s RAM (Random Access Memory) – temporary storage used by the program as long as it is running

Introduction Program compilation Programs that the CPU understands are at a very low level of detail in machine language beyond the scope of this class Higher level programming languages allow you to write code at more human readable levels Programming languages “compile” the code by converting the high level language instructions that you write into machine language level instructions the CPU understands Different programming languages have been standardized at this level with their own compilers (C, C++, Visual Basic, …)

Introduction Popular programs Many different types of programs have been created using specific programming languages that exist on a computer: internet browser, games, file management, etc. You know a lot of these programs already – you probably also know which programs run on which devices (Safari on a Mac or iPhone, Excel on Windows, Google Chrome on everything) Each one of these was written in a language that was compiled to a level that the machine’s CPU understands

Introduction Hardware differences Different computers essentially have their own CPUs (Intel core processors, T2 chips for Macs) These chips have their own architecture leading to their own machine language definitions This leads to a program written specifically for a Mac must be done with a compiler that knows how to take your program and convert it to the appropriate machine language instructions Many popular programs, though, run on different computers, yet work and look the same Is the same code written for one machine the same for another?

Introduction Native code The compilation to code that a specific CPU understands is called “native code” Native code for one processor will not work on another The higher level program, though, may be desired to work on multiple machines MS Word, Excel, Powerpoint – these programs work essentially the same whether on a PC or Mac The native code underneath for them will be different – can we get to that point using the same set of high level instructions?

Introduction Operating system Another layer of complexity that rests between the machine language and higher level programming language layers is the operating system (OS) The OS serves as organizational component that provides capabilities such as file and memory management You know these by name as well and which hardware they are associated with (iOS for Apple, Windows for PCs) OS updates affect the interfaces and the way you use the device and usually “shouldn’t” affect programs already installed

Introduction Operating system libraries Operating systems also come with programs that optimize on the machine language architecture it resides on iOS programs know how to use machine language modules that work well on an Apple product – similar for Windows on Intel-based products This leads to operating system specific compilers that convert your code to the appropriate machine language level instructions

Introduction Understanding the layers All together this presents a complex organizational structure for using computers and writing programs You can write C/C++ programs at a high levels that are compiled to native machine code for the given processor The compiler is designed for the specific OS that uses that to optimize the native code created This also leads to compilers that know specific OS features that are offered through the programming language This also leads to programs that are written for specific devices

Introduction iOS specific C++ program iOS compiler Mac native code Windows specific C++ program Windows compiler Intel-based native code

Introduction How does Java fit into the picture? Java comes in and addresses the programming language code differences across different operating systems Java does this by creating a Virtual Machine (JVM) environment that wraps itself around the operating system Java programs are compiled into instructions the JVM understands (called “bytecodes”) When the Java program runs, the bytecodes are converted to the OS specific native code depending on where the JVM resides

Introduction Java program (*.java) JVM Java compiler iOS Mac native code JVM bytecodes (*.class) Windows Intel-based native code

Introduction Pros and Cons The primary benefit to this is that the Java program can be written one way regardless of the OS it will run on The Java program will be specific to the version of the JVM and any OS where that JVM is installed will run your program The Java programmer does not have to focus on OS and CPU specific features – the JVM takes care of that including whenever updates occur Cost often that comes up is keeping up with versioning and performance due to the additional computation layer