java programming practice - arcs.skku.eduarcs.skku.edu/pmwiki/uploads/courses/swpractice1/... ·...

Post on 26-Mar-2020

0 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

▪ Course Overview

▪ Lecture Schedule

▪ Java Installation

1

Prof. Hwansoo Han

T.A. Hwiwon Kim

T.A. Minseop Jeong

JAVA Programming Practice

Course Overview

▪ SWE2023-42

▪ Lecture + Lab

• Lecture: ~1 hour basic Java features

• Lab: ~2.5 hours programming practices

▪ Programming projects

• Almost 10 lab practices

• 2 Assignments

• 1 project (2 in a team)

• No exams

2

Course Overview

▪ Precondition

• Introduction to computer science

• C programming experience

• Data structure

3

Course Overview

▪ Class materials

• http://arcs.skku.edu/Courses/SWPractice1

4

Class Policy

▪ Must – otherwise you will get ‘F’ grade

• Have to attend classes regarding to the project

• Submit term project and assignments

• Attend 12 weeks and more

▪ May

• Be absence from 1 class (no need to ask)

• From 2nd absent, it will be reflected on your grade

• Attending after lecture will be counted by late (2 lates = 1 absence)

• Not submit lab practice, but it will be reflected on your grade

5

Grading Policy

▪ Class attendance (10%)

• -1 points per absent

▪ Lab practices (10%)

▪ 2 Assignments (50%)

• 25% per each assignment (can be changed)

▪ Project (30%)

• 5% for intermediate presentation

• 25% for final presentation

6

Contact

▪ Office

• 85565, Corporate Collaboration Center

• 031) 290-4939

▪ Office Hour

• 14:00 ~ 15:00 on Thursday

▪ TA

• Hwiwon Kim• hwkim@arcs.skku.edu

• Minseop Jeong• msjeong@arcs.skku.edu

▪ Feel free to contact via e-mail

7

Lecture Schedule

Spring 2020 (Tuesday)

This schedule can be changed

M

A

R

C

H

10 17 24 31

Introduction

&

Install and setup Java

Basic Grammar Basic Grammar2 -

A

P

R

I

L

7 14 21 28

OOP

class-method

OOP

inheritance

OOP

APIFile I/O & CSV

M

A

Y

5 12 19 26

Error HandlingImport or Export

Package

Project Proposal

&

Some Tips

GUI

J

U

N

E

2 9 16 23

Project Intermediate

CheckJVM

FINAL TERM

(no class)

Project Final

Presentation

8

Today’s Task

▪ Briefly understanding Java

▪ Install Java on Microsoft Windows

• Ask TA if you do on Ubuntu or other with your laptop

▪ Install IDE for Java

9

Java is…

▪ James Gosling, Mike Sheridan and Patrick Naughton

initiated the Java language project in June 1991

▪ Originally designed for small, embedded systems like set-

top box

▪ Java also refers to an island of Indonesia where first coffee

was produced (called java coffee)

10

Also Java is…

▪ Front-runner of Object-Oriented Programming Language

▪ Executable on huge types of platforms

• with special, powerful and gorgeous item at that time, called JVM

• 3 billions of devices run Java applications

▪ Used for huge types of applications

• IoT, Smartphone, JSP, embedded software, enterprise applications, etc.

▪ Copyrighted by Oracle

• Original copyrighter, Sun, is taken over by Oracle

11

So, how does Java run?

▪ An overview of the Software development process

12

So, how does Java run?

▪ Through the Java VM, the same application is

capable of running on multiple platforms

13

So, how does Java run?

▪ Java Platform

• Java Virtual Machine (JVM)

• Java Application Programming Interface (API)

14

Then, how can we install Java?

15

https://www.oracle.com/java/technologies/javase-jdk11-downloads.html

Then, how can we install Java?

16

Then, how can we install Java?

17

Then, how can we install Java?

18

Make Oracle account & Log-in

Then, how can we install Java?

19

Environment Variable

1. For easy access to files

2. For using Java libraries

20

Set Environment Variable

1. [Win_key + R]

2. Type “sysdm.cpl” and press enter

21

Detailed guide:

http://stackoverflow.com/questions/2619584/how-to-set

-java-home-on-windows-7

Set Environment Variable

3. Move to “Advanced” tab

4. Click Environment Variables

22

Set Environment Variable

5. Click “New…”

6. Create variable “JAVA_HOME”

with the Java Installation Path

23

Set Environment Variable

5. Click “New…”

6. Create variable “JAVA_HOME”

with the Java Installation Path

24

Set Environment Variable

7. Also create variable “CLASSPATH”

by “%JAVA_HOME%\lib;.;”

25

Set Environment Variable

8. Modify variable “Path”

by adding “%JAVA_HOME%\bin”

26

Eclipse, Java IDE

▪ Most famous and powerful editor for implementing Java

▪ Pros

• Project management

• Check syntax error

• Console Input/Output

• Easy to debug

▪ Installation

• https://www.eclipse.org/downloads/download.php?file=/oomp

h/epp/2019-12/R/eclipse-inst-win64.exe

• Eclipse IDE for JAVA Developers

27

My new project

28

My new project

29

My new project

30

My new project

31

My new project

32

My new class

33

My new class

34

My new class

35

My new class

36

[Lab – Practice #1]

▪ HelloWorld.java

• Print “Hello Java!” on the screen

• [Ctrl + F11] to compile

public class HelloWorld {

public static void main () {

System.out.println (“Hello Java!”);

}

}

37

top related