Introduction to Application Programming IST 256 Application Programming for Information Systems Xiaozhong Liu
What is programming?
Information problem… Input Output
Information problem… Input ProgrammerSource File Compiler Library Java fileClass fileJar file Virtual Machine interpreter
Command line Or GUI Compute result Command line Or GUI Compute result Visual Basic Numeric Text File Internet … Numeric Text File Internet …
What is programming? Real WorldProgramming A student Public Class Student I am a student Student a_student = new Student( ) My name is Xiaozhong String name; name = “Xiaozhong” I was born in 1979 Int birth_year; birth_year = 1979 How old? Int age; age = 2010 – birth_year Use computer + programming to solve real-world problem…
A java example Real world problem: how to describe a student? 1. Define student public class student { String name; int age; } 2. Describe a student static void main public static void main(String[] args) { student stud_A = new student( ); stud_A.name = “Xiaozhong Liu” stud_A.age = 30; }
A java example Real world problem: add two numbers static void main public static void main(String[] args) { //input int number_1 = 20; int number_2 = 30; int sum; //process sum = number_1 + number_2; //output System.out.println(sum); }
Some Java Basics – Class name and file name should be the same ABC.java -> public class ABC { } – Source extension.java Compiled file extension.class – The compile process creates a.class file from the.java file Example: Project folder\src\MyProgram.java -> Project folder\build\MyProgram.class – Java is case sensitive
This class: Weekly Lab & Participation15% Homework Assignments and Final Project 40% Two in-class Exams and Final Exam 45%