Introduction to Algorithms and Data Structures CSC 1051 Algorithms - - PowerPoint PPT Presentation

introduction to algorithms and data structures
SMART_READER_LITE
LIVE PREVIEW

Introduction to Algorithms and Data Structures CSC 1051 Algorithms - - PowerPoint PPT Presentation

Introduction to Algorithms and Data Structures CSC 1051 Algorithms and Data Structures I Dr. Mary-Angela Papalaskari Department of Computing Sciences Villanova University Course website: www.csc.villanova.edu/~map/1051/s18 Some slides in


slide-1
SLIDE 1

CSC 1051 – Algorithms and Data Structures I

  • Dr. Mary-Angela Papalaskari

Department of Computing Sciences Villanova University

Course website: www.csc.villanova.edu/~map/1051/s18

Some slides in this presentation are adapted from the slides accompanying Java Software Solutions by Lewis & Loftus

CSC 1051 M.A. Papalaskari, Villanova University

Introduction to Algorithms and Data Structures

slide-2
SLIDE 2

What is this course about?

  • Computer Science
  • Problem solving
  • Algorithmic thinking
  • Data representation
  • Object oriented programming using Java

CSC 1051 M.A. Papalaskari, Villanova University

slide-3
SLIDE 3

Course website

www.csc.villanova.edu/~map/1051/s18/ Links to:

  • Schedule – topics, slides, projects, labs, code, etc.
  • Syllabus – course information
  • Piazza – class discussions, announcements
  • Blackboard – submit projects, check grades
  • Peer Tutors – extra help available for this course
  • Exam archive – past exams and quizzes & solutions

CSC 1051 M.A. Papalaskari, Villanova University

slide-4
SLIDE 4

Our textbook

Java Software Solutions

John Lewis & William Loftus 9th Edition

On reserve at the library

Older Editions: (generally ok, except for graphics sections and some exercise numbers that may be different)

slide-5
SLIDE 5

An old quote

A priest asked: “What is Fate, Master?” And he answered: “It is that which gives a beast of burden its reason for

  • existence. It is that which men in former times had to bear

upon their backs. It is that which has caused nations to build byways from City to City upon which carts and coaches pass, and alongside which inns have come to be built to stave off Hunger, Thirst and Weariness.” “And that is Fate?” said the priest. “Fate... I thought you said Freight,” responded the Master. “That's all right,” said the priest. “I wanted to know what Freight was too.”

  • Kehlog Albran

Source unknown. This quote appeared as one of the “fortunes” displayed by the fortune cookie program on old unix

  • systems. (“fortune” was a program that ran automatically every time you logged out of a unix session and displayed a

random, pithy saying.)

CSC 1051 M.A. Papalaskari, Villanova University

slide-6
SLIDE 6

Reverse History of computing

Examine what we already know, travel backwards…

  • 1. What we see now all around us – a connected

world of computing

  • 2. Focus on a single “traditional” computer
  • 3. Dig deeper – data and processing

CSC 1051 M.A. Papalaskari, Villanova University

slide-7
SLIDE 7

Networks A network is two or more computers that are connected so that data and resources can be shared

CSC 1051 M.A. Papalaskari, Villanova University

A A Loca cal-Are

  • Area Network

rk (L (LAN AN) ) co cove vers rs a sma small dist stance ce and a sma small numb mber r of co comp mputers rs A A Wide-Are

  • Area Network

rk (W (WAN AN) ) co connect cts s two or r mo more re LAN ANs, s,

  • ften ove

ver r long dist stance ces s

slide-8
SLIDE 8

The Internet and the World Wide Web

  • The Internet is a WAN which spans the planet
  • The Internet Protocol (IP) determines how data are routed

– devices have unique IP addresses, e.g., 204.192.116.2

  • The World Wide Web provides a common interface to data:

– text, graphics, video, sound, audio, executable programs

– Web documents often use HyperText Markup Language (HTML) – Information on the Web is found using a Uniform Resource Locator (URL):

http://www.google.com http://www.whitehouse.gov/issues/education

– A URL specifies a protocol (http), a domain, and possibly specific documents

  • A browser is a program which accesses network resources and

presents them – Popular browsers: Chrome, Internet Explorer, Safari, Firefox – My first browser: Mosaic <3

CSC 1051 M.A. Papalaskari, Villanova University

slide-9
SLIDE 9

The Internet

History: Started as a United States government project, sponsored by the Advanced Research Projects Agency (ARPA) in late 1960’s

See also: http://www.internethalloffame.org/internet-history/timeline

  • 1970’s and 1980’s: ARPANET

– wide area network – protocols for communication

  • 1990’s: World Wide Web

– html and web browsers

CSC 1051 M.A. Papalaskari, Villanova University

Image source: http://www.computerhistory.org/internet_history/full_size_images/1969_4-node_map.gif

1969: first four nodes of the internet

Historical Note: Connecting the world

slide-10
SLIDE 10

The Arpanet in 1971

CSC 1051 M.A. Papalaskari, Villanova University

‘Interface Message Processor’ (IMP) evolved into today’s routers.

Image source: http://www.computerhistory.org/internet_history/index.html

Historical Note: Connecting the world

slide-11
SLIDE 11

Reverse History of computing

Examine what we already know, travel backwards…

  • 1. What we see now all around us – a connected

world of computing

  • 2. Focus on a single “traditional” computer
  • 3. Dig deeper – data and processing

CSC 1051 M.A. Papalaskari, Villanova University

slide-12
SLIDE 12

A Computer Specification

  • Consider the following specification for a

personal computer:

– 3.07 GHz Intel Core i7 processor – 4 GB RAM – 750 GB Hard Disk – 16x Blu-ray / HD DVD-ROM & 16x DVD+R DVD Burner – 17” Flat Screen Video Display with 1280 x 1024 resolution – Network Card

CSC 1051 M.A. Papalaskari, Villanova University

slide-13
SLIDE 13

Computer Architecture

CSC 1051 M.A. Papalaskari, Villanova University

slide-14
SLIDE 14

Memory

memory locations (or cells) identified by y a unique nume meri ric c addre ress ss

9278 9278 9279 9279 9280 9280 9281 9281 9282 9282 9283 9283 9284 9284 9285 9285 9286 9286

CSC 1051 M.A. Papalaskari, Villanova University

Memory = Main Memory = Random Access Memory = RAM

(“R (“Random” m” beca cause se yo you don’t have ve to sca scan the me memo mory ry se sequentially y – – go to data dire rect ctly y usi sing the addre ress) ss)

10011010

jargon alert!

slide-15
SLIDE 15

CPU and Main Memory

Centra ral Pro Proce cessi ssing Unit Unit Ma Main Me Memo mory ry

CSC 1051 M.A. Papalaskari, Villanova University

Chip that exe xecu cutes s pro rogra ram m co comma mmands s Pri Prima mary ry st stora rage are rea for r pro rogra rams ms and data that are re in act ctive ve use se Syn Synonymo ymous s with RAM AM

slide-16
SLIDE 16

CPU and Main Memory

Centra ral Pro Proce cessi ssing Unit Unit Ma Main Me Memo mory ry

Historical note:

Von Neuman architecture

John Von Neuman, USA 1945

CSC 1051 M.A. Papalaskari, Villanova University http://en.wikipedia.org/wiki/Von_Neumann

Chip that exe xecu cutes s pro rogra ram m co comma mmands s Pri Prima mary ry st stora rage are rea for r pro rogra rams ms and data that are re in act ctive ve use se Syn Synonymo ymous s with RAM AM

slide-17
SLIDE 17

The Central Processing Unit

  • A CPU is on a chip called a microprocessor
  • It continuously follows the fetch-decode-execute

cycle:

fetch

Retri rieve ve an inst stru ruct ction fro rom m ma main me memo mory ry

decode

Determi rmine what the inst stru ruct ction is s

execute

Carry rry out the inst stru ruct ction

CSC 1051 M.A. Papalaskari, Villanova University

slide-18
SLIDE 18

The Central Processing Unit

  • A CPU is on a chip called a microprocessor
  • It continuously follows the fetch-decode-execute

cycle:

fetch

Retri rieve ve an inst stru ruct ction fro rom m ma main me memo mory ry

decode

Determi rmine what the inst stru ruct ction is s

execute

Carry rry out the inst stru ruct ction

system clock controls speed, measured in gigahertz (GHz)

CSC 1051 M.A. Papalaskari, Villanova University

slide-19
SLIDE 19

The Central Processing Unit

Arithmetic / Logic Unit Registers Control Unit Sma Small, ve very ry fast st me memo mory ry Pe Perf rforms rms ca calcu culations s and ma make kes s deci cisi sions s Coord rdinates s pro roce cessi ssing (syst (system m cl clock, ck, deco coding, etc) c)

CSC 1051 M.A. Papalaskari, Villanova University

slide-20
SLIDE 20

A machine that can follow a series of steps - a “program”

  • Early efforts:

– Jacquard loom (France 1801) – Babbage's Difference engine and Analytical engine (England 1822) – Holerith's census machine (USA 1890)

  • Colossus Mark I – first electronic computer to be

programmable (Alan Turing, England 1944)

  • Stored program and the fetch/decode/execute cycle (John

von Neumann, USA 1945)

  • ENIAC - first fully electronic digital computer (Eckert and

Mauchley, University of Pennsylvania, 1946)

CSC 1051 M.A. Papalaskari, Villanova University

Historical Note: Automatic control of computation

Image: http://www.biography.com/people/alan-turing-9512017

slide-21
SLIDE 21

Jacquard Loom

CSC 1051 M.A. Papalaskari, Villanova University

punched cards determine the pattern This portrait of Jacquard was woven in silk on a Jacquard loom using 24,000 punched cards (1839). Charles Babbage owned one of these portraits; it inspired him in using punched cards in his analytical engine. Collection of the Science Museum in London, England.

(Source: Wikipedia)

Historical Note: Automatic control of computation

slide-22
SLIDE 22

Charles Babbage & Ada Lovelace

CSC 1051 M.A. Papalaskari, Villanova University

Designed the Analytical Engine First “Programmer” for (not yet built) Analytical Engine

Historical Note: Automatic control of computation

slide-23
SLIDE 23

1945: The word “computer” changes its meaning

CSC 1051 M.A. Papalaskari, Villanova University

Captain Grace Hopper and other computers The Electronic Numeric Integrator and Calculator (ENIAC)

Programmers Betty Jean Jennings (left) and Fran Bilas (right) operate ENIAC's main control panel at the Moore School of Electrical Engineering. (U.S. Army photo from the archives of the ARL Technical Library)

Historical Note: Automatic control of computation

slide-24
SLIDE 24

CSC 1051 M.A. Papalaskari, Villanova University

2014: Benedict Cumberbatch shows the world how cool Alan Turing was

http://www.imdb.com/title/tt2084970/

Historical Note: Automatic control of computation

slide-25
SLIDE 25

Reverse History of computing

Examine what we already know, travel backwards…

  • 1. What we see now all around us – a connected

world of computing

  • 2. Focus on a single “traditional” computer
  • 3. Dig deeper – data and processing

CSC 1051 M.A. Papalaskari, Villanova University

slide-26
SLIDE 26

Data Representation

  • Computers store all

information digitally, using binary codes:

– numbers – text – images – audio – video – program instructions

CSC 1051 M.A. Papalaskari, Villanova University

9278 9278 9279 9279 9280 9280 9281 9281 9282 9282 9283 9283 9284 9284 9285 9285 9286 9286

01110100

slide-27
SLIDE 27

A byte is a group of eight bits

01110100

  • a numb

mber? r?

  • a letter?

r?

  • the re

red co comp mponent of a pixe xel?

  • a pro

rogra ram m inst stru ruct ction?

CSC 1051 M.A. Papalaskari, Villanova University

Computing devices store use binary codes to reprepresent data of all kinds

slide-28
SLIDE 28

Example: Representing Text

  • Characters, including spaces, digits, and

punctuation are represented by numeric codes

CSC 1051 M.A. Papalaskari, Villanova University

The Unicode character set extends ASCII to sixteen bits per character, allowing for 65,536 unique characters. The ASCII (American Standard Code for Information Interchange) character set uses eight bits per character, allowing for 256 unique characters

H H i , H e a t h e r r .

72 105 44 32 72 101 97 116 104 101 114 46 72 105 44 32 72 101 97 116 104 101 114 46 01110100

ASCII

00000000 01110100

UNICODE

slide-29
SLIDE 29

CSC 1051 M.A. Papalaskari, Villanova University

Example: Representing Pixels

Color(01110100, 01010110, 10001110)

red=116 green=86 blue=142

slide-30
SLIDE 30

Example: Representing Program Instructions

01110100

Intel opcode for the instruction JZ (jump if zero):

CSC 1051 M.A. Papalaskari, Villanova University

slide-31
SLIDE 31
  • Development of number systems & geometry
  • The notion of an algorithm
  • Creation of special purpose calculators

CSC 1051 M.A. Papalaskari, Villanova University

Historical Note:

Symbolic Representation & Mechanization of Arithmetic

slide-32
SLIDE 32

Basic human needs: counting & measuring

CSC 1051 M.A. Papalaskari, Villanova University http://ghoststudy.com/new11_galleries/halloweve1067.jpg

http://www.dreamstime.com/royalty-free-stock-photography-counting-sheep-image129737

Historical Note:

Symbolic Representation & Mechanization of Arithmetic

slide-33
SLIDE 33

Basic human needs: Symbolism

CSC 1051 M.A. Papalaskari, Villanova University

:-) <3

∞ ♬ π 

Historical Note:

Symbolic Representation & Mechanization of Arithmetic

slide-34
SLIDE 34
  • Development of number systems & geometry

– Abacus (China ~2400 BC) – Number systems (Babylonian, Greek, Roman, Arabic 1000 BC - 800 AD)

– Geometry (Egypt/Greece 300 BC)

CSC 1051 M.A. Papalaskari, Villanova University

images:"Euclid Elements Book 3 Proposition 35 c" by Aldoaldoz - Own work. Licensed under CC BY-SA 3.0 via Wikimedia Commons - https://commons.wikimedia.org/wiki/File:Euclid_Elements_Book_3_Proposition_35_c.png#/media/File:Euclid_Elements_Book_3_Proposition_35_c.png http://kids.britannica.com/elementary/art-86844/The-abacus-is-an-ancient-device-to-help-solve-math http://www.pelfusion.com/25-remarkable-roman-numeral-tattoos/

Historical Note:

Symbolic Representation & Mechanization of Arithmetic

slide-35
SLIDE 35
  • The notion of an algorithm

Euclid (300 BC) Muhammad ibn Musa al-Khwarizmi (800 AD)

CSC 1051 M.A. Papalaskari, Villanova University images:http://www.thefamouspeople.com/profiles/euclid-436.php https://en.wikipedia.org/wiki/Muhammad_ibn_Musa_al-Khwarizmi

Historical Note:

Symbolic Representation & Mechanization of Arithmetic

slide-36
SLIDE 36
  • Creation of special purpose calculators

Stonehenge (1900-1600 BC) Pascal's adder (1642) Leibniz's calculator (1670s) 1975 Texas Instruments calculator

CSC 1051 M.A. Papalaskari, Villanova University images: https://upload.wikimedia.org/wikipedia/commons/8/80/Arts_et_Metiers_Pascaline_dsc03869.jpg http://www.livescience.com/22427-stonehenge-facts.html http://history-computer.com/MechanicalCalculators/Pioneers/Lebniz.html

Historical Note:

Symbolic Representation & Mechanization of Arithmetic

slide-37
SLIDE 37

Historical notes:

Trends that gave rise to the modern computer

  • Symbolic representation and the mechanization of

arithmetic – the concepts of numbers, symbols, algorithms, and computation

  • Automatic control of computation – a “program” to

control operations (fetch/decode/execute cycle and the stored program concept)

  • Connecting the world – networks and telecommunications

CSC 1051 M.A. Papalaskari, Villanova University

+

= modern computer

+

slide-38
SLIDE 38

Computer Science

A new paradigm in humanity’s search for understanding of:

– Symbolic representation – Computation – Problem solving – Mechanization

History Epilogue: Just like Physics and other sciences branched off from philosophy during the Renaissance, so CS emerged in the 20th century from the work of philosophers and mathematicians – with the help of dedicated, visionary practitioners, experimental scientists and engineers.

CSC 1051 M.A. Papalaskari, Villanova University

slide-39
SLIDE 39

Part 2 – introduction to Java

CSC 1051 M.A. Papalaskari, Villanova University

slide-40
SLIDE 40
  • Programmer writes Source code
  • Translation produces the binary equivalent –

Object code

  • Translation is performed by an assembler,

compiler, or interpreter (stay tuned)

CSC 1051 M.A. Papalaskari, Villanova University

High-level programming languages

slide-41
SLIDE 41

Java Translation

Java source code Machine code Java bytecode Bytecode interpreter Bytecode compiler Java compiler

CSC 1051 M.A. Papalaskari, Villanova University

slide-42
SLIDE 42

Development Environments

  • There are many programs that support the

development of Java software, including:

– Sun Java Development Kit (JDK) – Sun NetBeans – IBM Eclipse – IntelliJ IDEA – Oracle JDeveloper – BlueJ – jGRASP

  • Though the details of these environments differ,

the basic compilation and execution process is essentially the same

CSC 1051 M.A. Papalaskari, Villanova University

slide-43
SLIDE 43

Java Program Structure

  • In the Java programming language:

– A program is made up of one or more classes – A class contains one or more methods – A method contains program statements

  • These terms will be explored in detail throughout

the course

  • A Java application always contains a method

called main

  • See Lincoln.java

CSC 1051 M.A. Papalaskari, Villanova University

slide-44
SLIDE 44

CSC 1051 M.A. Papalaskari, Villanova University

//******************************************************************** // Lincoln.java Author: Lewis/Loftus // // Demonstrates the basic structure of a Java application. //******************************************************************** public class Lincoln { //----------------------------------------------------------------- // Prints a presidential quote. //----------------------------------------------------------------- public static void main (String[] args) { System.out.println ("A quote by Abraham Lincoln:"); System.out.println ("Whatever you are, be a good one."); } }

Java Program Example

slide-45
SLIDE 45

Java Program Structure

public class MyProgram { } // comments about the class cl class ss header r cl class ss body y Comme mments s ca can be place ced almo most st anyw ywhere re

CSC 1051 M.A. Papalaskari, Villanova University

slide-46
SLIDE 46

Java Program Structure

public class MyProgram { } // comments about the class public static void main (String[] args) { } // comments about the method me method header r me method body y

CSC 1051 M.A. Papalaskari, Villanova University

slide-47
SLIDE 47

Comments

  • Comments in a program are called inline

documentation

  • They should be included to explain the purpose of

the program and describe processing steps

  • They do not affect how a program works
  • Alternative ways of making Java comments:

// This comment runs to the end of the line /* This comment runs to the terminating symbol, even across line breaks */

CSC 1051 M.A. Papalaskari, Villanova University

slide-48
SLIDE 48

White Space (Spaces, blank lines, and tabs )

  • Extra white space is ignored
  • Programs should be formatted to enhance

readability, using consistent indentation

  • See Lincoln2.java, Lincoln3.java

CSC 1051 M.A. Papalaskari, Villanova University

slide-49
SLIDE 49

Errors

CSC 1051 M.A. Papalaskari, Villanova University

slide-50
SLIDE 50

Errors

  • A program can have three types of errors
  • The compiler will find syntax errors and other basic

problems (compile-time errors)

– If compile-time errors exist, an executable version of the program is not created

  • A problem can occur during program execution, such as

trying to divide by zero, which causes a program to terminate abnormally (run-time errors)

  • A program may run, but produce incorrect results,

perhaps using an incorrect formula (logical errors)

CSC 1051 M.A. Papalaskari, Villanova University

slide-51
SLIDE 51

The original ”bug” found in the relays of Harvard’s Mark II computer by Admiral Grace Murray Hopper’s team.

CSC 1051 M.A. Papalaskari, Villanova University

Source: en.wikipedia.org/wiki/File:H96566k.jpg

slide-52
SLIDE 52

Lab 1:

  • Learn about jGrasp - the programming environment (IDE) that we will be

using

  • Compile …. and run a java program
  • Understand the relationship between a Java class name and file names
  • Practice using basic Java output statements and adding comments
  • Learn the basics of sequential execution, variables, and the assignment

statement System.out.println ("Howdy " + name);

System.out.println ("The answer is " + x); System.out.print ("Counting... up: " + (count + 1)); System.out.println (" ... and\n ... down: " + (count - 1));

  • Experience some errors!

CSC 1051 M.A. Papalaskari, Villanova University

slide-53
SLIDE 53

Identifiers

  • Identifiers are used for naming variables, classes, and
  • ther components of a program.
  • An identifier can be made up of:

– letters (upper or lower case – case sensitive!) – digits (but cannot begin with a digit) – underscore character ( _ ) – the dollar sign ($) – NOTHING ELSE!

  • Example: Total, total, and TOTAL are different

identifiers

  • Conventions: use case to indicate whether it is a class or

a variable etc.

CSC 1051 M.A. Papalaskari, Villanova University

slide-54
SLIDE 54

Reserved Words

These identifiers have a special meaning in Java and cannot be used in any other way:

abstract assert boolean break byte case catch char class const continue default do double else enum extends false final finally float for goto if implements import instanceof int interface long native new null package private protected public return short static strictfp super switch synchronized this throw throws transient true try void volatile while

CSC 1051 M.A. Papalaskari, Villanova University

slide-55
SLIDE 55

Character Strings

  • A string literal is represented by putting double

quotes around the text

  • Examples:

"This is a string literal." "123 Main Street" "X"

CSC 1051 M.A. Papalaskari, Villanova University

slide-56
SLIDE 56

Character Strings

  • A string literal is represented by putting double

quotes around the text

  • Examples:

"This is a string literal." "123 Main Street" "X"

CSC 1051 M.A. Papalaskari, Villanova University

spaces matter in here!

slide-57
SLIDE 57

The println Method

  • In the Lincoln program we invoked the println

method to print a character string

  • The System.out object represents a destination

(the monitor screen) to which we can send output

System.out.println ("Whatever you are, be a good one.");

  • bject

ct me method name me informa rmation pro rovi vided to the me method (p (para rame meters) rs)

CSC 1051 M.A. Papalaskari, Villanova University

slide-58
SLIDE 58

The print Method

  • In the Lincoln program we invoked the println

method to print a character string

  • The System.out object represents a destination

(the monitor screen) to which we can send output

  • print is similar to println except that it does

not advance to the next line

System.out.print ("Whatever you are, be a good one.");

  • bject

ct me method name me informa rmation pro rovi vided to the me method (p (para rame meters) rs)

CSC 1051 M.A. Papalaskari, Villanova University

slide-59
SLIDE 59

String Concatenation

  • The string concatenation operator (+) is used to

append one string to the end of another "And one more " + "thing"

CSC 1051 M.A. Papalaskari, Villanova University

slide-60
SLIDE 60

Hands on:

  • Use MyQuote.java as a starting point (program from

Lab 1), focus on this part of the code:

System.out.println ("Howdy " + name); System.out.println ("The answer is " + x); System.out.print ("Counting... up: " + (count + 1)); System.out.println (" ... and\n ... down: " + (count - 1));

  • Try the following:

1) What if you remove the parentheses around (count + 1)? 2) What happens if we try this way of breaking a line:

System.out.print ("Counting...

up: " + (count + 1));

3) How can we get all this output to print all in one line?

  • Other examples (textbook): Countdown.java Facts.java

CSC 1051 M.A. Papalaskari, Villanova University

slide-61
SLIDE 61

Escape Sequences

  • What if we wanted to print the quote character? e.g.,

System.out.println ("I said "Hello" to you."); // wrong!

  • An escape sequence is a series of characters that

represents a special character.

  • Example:

System.out.println ("I said \"Hello\" to you.");

  • Some Java escape sequences:

CSC 1051 M.A. Papalaskari, Villanova University

Esca Escape Se Sequence ce \t \n \" \' \\ Me Meaning tab tab newline newline double quote double quote si single quote backsl ckslash sh

slide-62
SLIDE 62

CSC 1051 M.A. Papalaskari, Villanova University

//******************************************************************** // Roses.java Author: Lewis/Loftus // // Demonstrates the use of escape sequences. //******************************************************************** public class Roses { //----------------------------------------------------------------- // Prints a poem (of sorts) on multiple lines. //----------------------------------------------------------------- public static void main (String[] args) { System.out.println ("Roses are red,\n\tViolets are blue,\n" + "Sugar is sweet,\n\tBut I have \"commitment issues\",\n\t" + "So I'd rather just be friends\n\tAt this point in our " + "relationship."); } }

Output

Roses are red, Violets are blue, Sugar is sweet, But I have "commitment issues", So I'd rather just be friends At this point in our relationship.

Example from textbook: Roses.java

slide-63
SLIDE 63

Quick Check

CSC 1051 M.A. Papalaskari, Villanova University

Write a single println statement that produces the following output:

"Thank you all for coming to my home tonight," he said mysteriously.

slide-64
SLIDE 64

Summary

  • History of computing
  • Computer hardware and software overview
  • An introduction to Java:

– Identifiers – Comments – Errors – Strings and printing

CSC 1051 M.A. Papalaskari, Villanova University