Homework0 - b) Dividing by zero (R) c) Forgetting a...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Homework0 Name: Sung June Pyun Part 1 1.3 How many unique items can be represented with each of the following? 1 bit: 2 3 bits: 8 6 bits: 64 8 bits: 256 10 bits: 1024 16 bits: 2 16 1.17. Why are the following valid Java identifiers not considered good identifiers? q: doesn’t mean anything. It could mean something, but nobody could recognize. Even the programmer will forget after a certain time totVal: It’s a abbreviation. Abbreviations are allowed, but its hard to know what the tot Val means. theNextValueInTheList: This is too long. 1.18 Java is case sensitive. What does that mean? It means that two identifier names that differ only in the case of their letters are considered to be different identifiers. That means the same world with upper and lower case letter have different values. 1.20 Categorize each of the following situations as a compile-time error(C), runtime error(R), or logical error (L). a) Multiplying two numbers when you meant to add them. (L)
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: b) Dividing by zero (R) c) Forgetting a semicolon at the end of a program statement (C) d) Spelling a word wrong in the output (C) e) Producing inaccurate results (L) f) Typing a { when you should have typed ( (C) Part2 Peanut butter and Jelly Sandwich Ingredients: two slices of toast bread, two Table spoons of peanut butter, two table spoons of jelly. Tools: Knife, toaster, spoon, a plate Direction: 1. Put the two slices of toast bread in a toaster and push the on button. 2. As the toast bread goes up, take them. 3. Use a Table spoon to get two Table spoons of peanut butter. 4. Put them on one side of just one slice of bread. 5. Now use the spoon to get two Table spoons of Jelly. 6. Put the Jelly on one side of the bread that you did not put the peanut butter. 7. Now, put the two slices together so that the side of peanut butter and jelly gets together. 8. Put it on a plate....
View Full Document

This note was uploaded on 04/15/2009 for the course ASTRONOMY 1000 taught by Professor Kim during the Spring '01 term at Yonsei University.

Page1 / 2

Homework0 - b) Dividing by zero (R) c) Forgetting a...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online