COP 3502 Chapter 2: Elementary Programming

67 views6 pages

Document Summary

The focus of this chapter is on learning programming techniques to solve problems. Writing programs involve designing algorithms and translating them into programing instructions (code). Algorithm-describes how problem is solved by listing actions that need to be taken and the order of their execution. Pseudocode-natural language combined with some programming code; usually used for planning when planning to write a program. Variable-represents a value stored in the computer"s memory. Primitive data types (fundamental types)-integers, real numbers, characters, and booleans (i. e. int, short, long, float, double, byte, char, and boolean) Float point numbers-numbers with decimals (i. e. float and double) Declaring variables-creating a variable with a data type. String concatenation-using (cid:498)+(cid:499) to combine other variables with strings (cid:523)e. g. (cid:498)a(cid:499) + (cid:498)b(cid:499) becomes (cid:498)ab(cid:499)(cid:524) To get an input from the console, the scanner class is used. The scanner class must be imported in the beginning of the program from the java. util package before it can be used.

Get access

Grade+20% off
$8 USD/m$10 USD/m
Billed $96 USD annually
Grade+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
40 Verified Answers
Class+
$8 USD/m
Billed $96 USD annually
Class+
Homework Help
Study Guides
Textbook Solutions
Class Notes
Textbook Notes
Booster Class
30 Verified Answers

Related Documents