1 / 11

CSCI 115

CSCI 115. Computer Programming Overview. Computer Software. System Software Operating systems Utility programs Language compilers Application Software. Language Compilers. Programming Generations 5 Generations 1GL - Machine Language 2GL - Assembly Language 3GL - Compiled Languages

bjorn
Download Presentation

CSCI 115

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  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 • 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); intvalToConvert = 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(); } }

More Related