TCU CoSc 10403 Programming with Java - PowerPoint PPT Presentation

1 / 11
About This Presentation
Title:

TCU CoSc 10403 Programming with Java

Description:

Lab submission process. Creating Java programs with Code Warrior. Reference ... { setBackground (Color.yellow); add (helloLabel); Some Java Data Types. Integer ... – PowerPoint PPT presentation

Number of Views:44
Avg rating:3.0/5.0
Slides: 12
Provided by: drlisab
Category:
Tags: cosc | tcu | java | programming

less

Transcript and Presenter's Notes

Title: TCU CoSc 10403 Programming with Java


1
TCU CoSc 10403 Programming with Java
  • Lecture 1
  • Development Environment

2
Agenda
  • Roll
  • Last time
  • Course Overview
  • Today
  • Lab submission process
  • Creating Java programs with Code Warrior

3
Reference
  • Lab and CodeWarrior Introduction
  • On course web page
  • http//www.cs.tcu.edu/10403/
  • Help sessions scheduled soon
  • To work through the intro
  • Work through intro carefully
  • Avoid headaches later!

4
Basic Steps
  • Setting up your environment
  • Tools IE, CodeWarrior, TURNIN
  • Frogfile (U drive)
  • Where your applets (not source code) will be
    posted
  • Watch disk space quota!
  • I drive
  • Files to setup your Frogfile to submit your labs

5
Basic Steps
  • Codewarrior (demo with HelloWorld)
  • New ? Java stationary
  • Lab0Project
  • JDK 1.3 ? Java Applet
  • Edit
  • .java file
  • .html file
  • Project ? Run

6
Basic Steps
  • Publishing your applet (class,html files)
  • COPY
  • Lab0.html file
  • JavaClasses folder
  • Test on IE
  • http//stuwww.tcu.edu/myname/10403labs.html

7
Basic Steps
  • Submitting your Java source (.java)
  • TURNIN
  • Select Course (e.g., 10403-15)
  • Select Lab (e.g., Lab0)
  • Enter your TCU email
  • KEEP YOUR RECEIPT NUMBER!

8
Java Overview
  • Applets
  • Html file java class files (bytecodes)
  • Browser with JVM
  • Applications
  • Executes outside a browser
  • Later in the course
  • Starting Spring 2004

9
Sample Java Program
  • import java.applet.
  • import java.awt.
  • /
  • HelloWorld program in Java taken from Java
    Programming for Dummies
  • LJB Feb. 99
  • /
  • public class HelloWorld extends Applet
  • Label helloLabel new Label ("Hey, are you
    looking at me?")
  • public void init ()
  • setBackground (Color.yellow)
  • add (helloLabel)

10
Some Java Data Types
  • Integer ? -2054 21013
  • Floating point ? -32.7 13.01
  • Boolean ? true false
  • Characters ? A ? _at_
  • Strings ? Cats are great!
  • Class types ? Graphics g
  • object of type Graphics

11
Java Language Features
  • Comments / / or //
  • Operators , - , , /
  • Expression (9.0/5.0)celsius 32
  • Statements
  • farenheit (9.0/5.0)celsius 32
  • If (number gt 0)
  • average sum / count
Write a Comment
User Comments (0)
About PowerShow.com