Download presentation
Presentation is loading. Please wait.
Published byDamian Beasley Modified over 9 years ago
1
CSCI 115 Computer Programming Overview
2
Computer Software System Software –Operating systems –Utility programs –Language compilers Application Software
3
Language Compilers Programming Generations –5 Generations 1GL - Machine Language 2GL - Assembly Language 3GL - Compiled Languages –Procedural »COBOL »C –OOP »Java »C++ 4GL – SQL 5GL
4
Programming Languages C –Powerful and flexible FORTRAN –Mathematics and engineering COBOL –Business JAVA –Flexible –Web based 100s of others
5
History of Java –First started in 1990 as Sun’s Green project Digitally controlled consumer devices identified as trend –Oak –Trend did not grow as expected –1994 – WWW popularity –Netscape packaged Java within browser MS Explorer followed suit –Success ultimately depended on e-commerce
6
Development Tools 1995 – First JDK released by Sun (1.0) –Very limited JDK 1.1 released –Limited GUI creation 1.2 released –Major change – Swing components –Java 2 SDK release 1.2 –Better known as Java 2
7
Development Tools Many environments within which to create apps –Any text editor –Eclipse –TextPad
8
Problem Solving Technique Define Problem Devise plan to fix problem Implement the plan Test
9
Steps in Java programming cycle Use editor to create source code Compile files Link files Execute program
10
Number Bases Electronic devices –2-state system: On = 1, Off = 0 –Base 2 Converting from non-decimal to decimal base –Expanded form Converting from decimal to non-decimal base –Repeated division of non-decimal base Calculator
11
Java Program - Base Conversions import java.util.*; public class Bases { public static void main(String args[]) { Scanner s = new Scanner(System.in); int valToConvert = 0, base = 0; System.out.print("Enter the number to convert: "); valToConvert = s.nextInt(); System.out.println(); System.out.print("Enter the base to convert to: "); base = s.nextInt(); System.out.println(); System.out.print(valToConvert + " in base " + base); System.out.println(" is: " + Integer.toString(valToConvert, base)); System.out.println(); }
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.