CS 106A Lecture 7: CS 106A Lecture Notes Week 3 Mon

15 views2 pages

Document Summary

Announcements: partners starting with assignment 2, clair hours beginning tonight; same place and time as lair, partners should be in same section; ask section leader if need help finding one. Parameters: redundant recipes: writing two recipes, one for making 20 cookies and another for making 40 recipes, parameterized recipe. Parameter: a value that distinguishes similar tasks. To make n cookies, use n/5 cups of flour, n/20 cups of butter, etc: boxes of stars. To create a 10x4 box of stars . A for loop to draw a line of ten asterisks. A for loop that draws a line with an asterisk, eight spaces, and an asterisk two times. To create a slightly modified box of stars . Declare variables width and height: the eight spaces can be (width 2) because it is just the width of the box minus two asterisks at the ends. E. g. public void password( int code: passing a parameter.

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