MAT 21B Lecture 13: Lecture 13

29 views2 pages
School
Department
Course
Professor
Lecture 13
Arrays
The case for arrays
Draw backs
- Approach is not scalable
- Doesn’t quiet capture the nature of grades
As algorithms become more complex
- Break down in smaller steps
- Functions can be refined even further
- Hierarchy of function
Data types also form a hierarchy
- Use simple data types to define more complex ones
- As many levels as necessary to represent what the program requires
- Combine independent data value into a single unified collection
- Reduce conceptual complexity
Algorithms +Data structure = Programs
Array definition
- An array groups distinct variable of the same type under a single name
o Definition of array grade
Four distinct elements
Each type int
o Access to each element through a subscript
Index is an integer value
First element at index 0
Last element at index one less than the number of element
- Visual representation
Unlock document

This preview shows half of the first page of the document.
Unlock all 2 pages and 3 million more documents.

Already have an account? Log in
beigecamel74 and 41 others unlocked
MAT 21B Full Course Notes
83
MAT 21B Full Course Notes
Verified Note
83 documents

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