CSC 1350 Chapter : Notes For Chapter 2

13 views3 pages
15 Mar 2019
School
Course
Professor

Document Summary

Most computer programs hold temporary values in named storage locations. There are many different types of storage to hold different things. You declare a variable by telling the compiler: What name you will use to refer to it. Integer, data types, whole numbers, positive or negative. Decimal related, professor recommends double as to float, its stored in twice as much memory. Identifier cannot begin with a digit: a whole number, a number with a fraction part, a word int double. Capitalize every first letter of a word after the variable int cansperpack = 6; double canvolume = 12. 0; When a variable is defined with the reserved word final, its value can never be changed. It is good style to use named constants to explain numerical values to be used in calculations. Which is clearer? double totalvolume = bottles * 2; double totalvolume = bottles * bottle_volume; Might need to ask for input and then save what was entered.

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