COM SCI 31 Final: Final Summary Notes
Document Summary
A program expressed as integers, executed by cpu. Program assembled into machine language by assembler. Translating human language ==> machine language is mechanical. Program development: start early, develop incrementally, read the spec/faq properly. Cake recipe in english translated by english-to-chinese translator robot. Send cake recipe in chinese + ingredients into cooking robot. Violation of rules of english so translator can"t deal. Programming equivalent: too much to store/infinite loop. Variables: what kind of data to hold. If multiple words, capitalize first letter of subs. words. 14%5 = 4 (modulo/mod/remainder: both must be int) Reading in user input getline(cin, stringhere); //read in string cin >> inthere; //read in an int. //read in a string at any point after cin >> int cin. ignore(1000, "\n"); //consumes first 1000 chars or newline getline(cin, anotherstring); Operators on a and b a>b a>=b a