12
CIS 120 Problem Solving Programming Java

CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Embed Size (px)

Citation preview

Page 1: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

CIS 120

Problem Solving Programming Java

Page 2: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Problem Solving

Problem-Solving: the process of defining a problem, searching for relevant information and resources about the problem, and of discovering, designing, and evaluating the solutions for further opportunities.

Very desirable to be a good Problem Solver in any CIS discipline.

Page 3: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Polya’s – How to Solve a Problem?

Understand the Problem Devise a Plan Implement the Plan Evaluate/Examine the Solution

Page 4: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Understand the Problem

First. You have to understand the problem.

What is the unknown? What are the data? What is the condition?

Draw a figure. Introduce suitable notation.

Page 5: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Devise a Plan

Review prior experience Find connections between the

knows and unknowns. Simplify problem into a smaller

problems Design a solution

Page 6: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Implement the Plan

Carry out the plan checking the preliminary results at each step.

Code A Little Test A lot

Page 7: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Evaluate/Examine the Solution

Check result in alternate ways Look for new solutions Can other problems be solved

using these techniques?

Page 8: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Programming

Programming – the creation of an ordered set of instructions to solve a problem with a computer.

Not enough to know a particular programming language… Must be able to problem solve…

Page 9: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Programming Languages Machine Languages

Natural language of a particular computer Any other types of languages must be translated

down to this level Assembly Languages

English-like Abbreviations used for operations (Load R1, R8)

High Level Languages Look of everyday English using common

mathematical notation Total Cost = Price + Tax; Java, C, C++, FORTRAN, BASIC, PASCAL

Page 10: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Brief History of Java

Developed by SUN Microsystems for consumer-electronic devices

First widespread use was to provide dynamic web content

Created by James Gosling

Page 11: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Java Environment Edit – JGRASP Compile – JAVAC (translated into

bytecodes) -> class file Load – class is loaded into main memory Verify – bytecodes are verified as they

are loaded into memory Execution – JAVA Interpreter interprets

the bytecodes for that system.

Page 12: CIS 120 Problem Solving Programming Java. Problem Solving Problem-Solving: the process of defining a problem, searching for relevant information and resources

Two Types of Java Programs

Applications – stored and run from a local computer

Applet – stored on a remote computer and executed by a Web Browser What does this say about a web

browser? The Browser must support loading,

verifying and interpreting the applet.