Download presentation
Presentation is loading. Please wait.
Published byUrsula Dennis Modified over 9 years ago
1
Math 107 Introduction To Scientific Programming
2
S.Horton/107/Ch. 1Slide 2 Acknowledgements … Portions of these notes reproduce charts, slides, and tables from: Java Software Solutions, 4 th Edition (2005), by Lewis & Loftus Java: An Introduction To Computer Science & Programming, 3 rd Edition (2004), by W. Savitch Some screen shots are: © Microsoft Corporation Other Acknowledgements: Solaris, Java, Java Beans, and JS2E SDK are © Sun Corporation Windows and Window XP are © Microsoft Corporation JCreator Pro and JCreator LE are © Xinox Corporation
3
S.Horton/107/Ch. 1Slide 3 Welcome To… Garbage in, Garbage out. - A common programmer’s lament.
4
S.Horton/107/Ch. 1Slide 4 Course Philosophy I have three major instructional goals for this class that can be summed up in: “Scientific Software Development in Java”
5
S.Horton/107/Ch. 1Slide 5 Course Philosophy - II I.Scientific Use computers to solve quantitative/scientific problems in math, science, economics, … II.Software Development Learn the process used to develop successful software programs; Learn algorithms and special data/control structures to solve problems; III.Java Learn a programming language called Java that can instruct a computer how to operate and handle data.
6
S.Horton/107/Ch. 1Slide 6 Math 107 & 107L Logistics Syllabus Walkthrough Instructor/Contact Info Course Material: Book/CD (Get Some Floppies) Lab Hours: M-F 8:00 am – 6:30 pm (Check posting) Computer Access – “Lab Packet” JCreator download: http://www.jcreator.com/ Sun Java Web site: http://java.sun.com
7
S.Horton/107/Ch. 1Slide 7 How To Succeed In This Class Read material BEFORE class Quickly setup/learn JCreator IDE Programming Projects Be prepared to iterate (cycle through multiple times) Be prepared to spend more time on software development outside of the lab Optional – Setup JCreator outside of lab for extra convenience
8
S.Horton/107/Ch. 1Slide 8 Course Introduction I.Before software, there is hardware! II.Introduction to Java III.Software design methodology IV.Getting started
9
S.Horton/107/Ch. 1Slide 9 I. A Crash Course in “PC Computer Hardware” You need to understand the hardware platform before you develop software for it! Many types of hardware platforms PCs / Mainframes/ Laptops Cell Phones / PDAs / Pocket PCs Embedded Systems: Medical Devices, Machines, … Different Computing Models Client/Server, Enterprise/Server Distributed (VPN) Network Appliance/”Thin” Client Mobile/Wireless
10
S.Horton/107/Ch. 1Slide 10 Simplified Schematic of PC Architecture Keyboard Mouse Internet RAM or DRAM CPU “Hard drive” Software programs routinely have to manage some or all of these resources efficiently
11
S.Horton/107/Ch. 1Slide 11 Micrograph of CPU Core Control Unit Registers CPU Memory or “Cache” ALU
12
S.Horton/107/Ch. 1Slide 12 Simplified PC Program Execution Model 1)OS loads executable code into Main Memory 2)Control unit fetches first line of executable code 3)Fetch-Decode-Execute cycle is initiated
13
S.Horton/107/Ch. 1Slide 13 II. Introduction to JAVA History First conceived at Sun in 1991 to program toasters! Inventor James Gosling apparently decided the name while out at a (what else) coffee shop. Oak – To Java – To Java Eveywhere. Recently, a big fight over Microsoft’s non- authorized modifications for Windows (J++).
14
S.Horton/107/Ch. 1Slide 14 Introduction to Java Main Attributes General purpose programming language with all of the modern elements of OOP (encapsulation/ inheritance/ polymorphism…) Syntax similar to C/C++ Portability - “Write once, run many…” Also runs in web browsers (Applets) which means most types of computers Not controlled by Microsoft (controlled by Sun)
15
S.Horton/107/Ch. 1Slide 15 The Java Software Development Model – “Write Once, Run Many” J2SE (MS Windows) JCreator Portable “Applets” Input The biggest difference between this and some other development models is that the compilation process has been split into two parts Java Virtual Machine (JVM)
16
S.Horton/107/Ch. 1Slide 16 What Java Is Not – Assembler Language
17
S.Horton/107/Ch. 1Slide 17 The Popularity of Java - The World Wide Web!
18
S.Horton/107/Ch. 1Slide 18 UCSD Supercomputer Center Internet Visualization Project
19
S.Horton/107/Ch. 1Slide 19 III. Software Design Methodology - Single Person Design Cycle Design Code Run Test Bullet-Proofing Debug Painful & Time Consuming! Deploy
20
S.Horton/107/Ch. 1Slide 20 Major Goals in Software Design 1.Operational (Customer) Does it work? Does it meet the design specification? 2.Performance (Customer) Is it efficient (Speed/Memory/Disk Space)? Can it handle errors? 3.Maintainable (Programmer) Is it understandable? Is it modifiable?
21
S.Horton/107/Ch. 1Slide 21 IV. Getting Started! 1.Start the JCreator IDE 2.Input source code 3.Compile & Run
22
S.Horton/107/Ch. 1Slide 22 JCreator Integrated Development Environment (IDE)
23
S.Horton/107/Ch. 1Slide 23 The Traditional And Famous Hello World Program! /* MyFirstJavaProgram is the Java version * of the famous and traditional Hello * World program which writes Hello world * to the console window. * * Author: S. Horton * Date: 8/01/03 * */ public class MyFirstJavaProgram { public static void main(String[] args) { System.out.println("Hello world!"); }
24
S.Horton/107/Ch. 1Slide 24 Select New-File, Input A Name & Path, Type Code Into Editor
25
S.Horton/107/Ch. 1Slide 25 Click Compile, Check For Errors, Click Run
26
S.Horton/107/Ch. 1Slide 26 If You Succeed …
Similar presentations
© 2025 SlidePlayer.com Inc.
All rights reserved.