Adapted from slides by Marty Stepp and Stuart Reges

Slides:



Advertisements
Similar presentations
Your teacher is giving you a test worth 100 points containing 40 questions. There are two-point and four-point questions on the test. How many of each.
Advertisements

Answer R1 R2.
CSC 8560Fall 2000 Computer NetworksBhargavi Balasubramanian & Bob Viola Project 1 Description: E-Commerce Objective:Build a web storefront to sell videos.
REEM ALMOTIRI Information Technology Department Majmaah University.
CSc 110, Autumn 2016 Lecture 9: input ; if/else Adapted from slides by Marty Stepp and Stuart Reges.
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2016 Lecture 26: Sets and Dictionaries
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2017 Lecture 16: Fencepost Loops and Review
CSc 110, Spring 2017 Lecture 12: Random Numbers
CSc 110, Autumn 2017 Lecture 17: while Loops and Sentinel Loops
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2017 Lecture 19: While loops and File Input
CSc 110, Autumn 2017 Lecture 20: Line-Based File Input
CSc 110, Spring 2017 Lecture 29: Sets and Dictionaries
CSc 110, Autumn 2017 Lecture 21: Line-Based File Input
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2016 Lecture 27: Sets and Dictionaries
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2017 Lecture 24: Lists for Tallying; Text Processing
CSc 110, Autumn 2017 Lecture 18: While loops and File Input
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2016 Lecture 13: Random Numbers
CSc 110, Spring 2017 Lecture 28: Sets and Dictionaries
CSc 110, Autumn 2017 Lecture 5: The for Loop and user input
CSc 110, Spring 2018 Lecture 32: Sets and Dictionaries
CSc 110, Autumn 2017 Lecture 31: Dictionaries
CSc 110, Autumn 2017 Lecture 30: Sets and Dictionaries
CSc 110, Autumn 2016 Lecture 12: while Loops, Fencepost Loops, and Sentinel Loops Adapted from slides by Marty Stepp and Stuart Reges.
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
G7 programing language Teacher / Shamsa Hassan Alhassouni.
CSc 110, Spring 2018 Lecture 33: Dictionaries
CSc 110, Autumn 2016 Lecture 31: Encapsulation
CSc 110, Spring 2018 Lecture 16: Fencepost Loops and while loops
CSc 110, Spring 2018 Lecture 9: Parameters, Graphics and Random
CSc 110, Spring 2018 Lecture 17: while Loops and decomposition
CSc 110, Autumn 2016 Lecture 9: input; if/else
Lecture 22: lists Adapted from slides by Marty Stepp and Stuart Reges
Building Java Programs
CSc 110, Autumn 2017 Lecture 9: Graphics and Nested Loops
CSc 110, Autumn 2016 Lecture 5: Loop Figures and Constants
CSc 110, Spring 2017 Lecture 17: Line-Based File Input
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2016 Lecture 20: Lists for Tallying; Text Processing
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Spring 2018 Lecture 5: The for Loop and user input
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2016 Lecture 17: Line-Based File Input
CSc 110, Spring 2018 Lecture 22: Line-Based File Input
CSc 110, Spring 2018 Lecture 5: Loop Figures and Constants
CSc 110, Spring 2018 Lecture 27: Lists that change size and File Output Adapted from slides by Marty Stepp and Stuart Reges.
CSc 110, Spring 2018 Lecture 8: input and Parameters
CSc 110, Spring 2018 Lecture 10: More Graphics
CSc 110, Spring 2018 Lecture 21: Line-Based File Input
CSc 110, Autumn 2016 Programming feel like that?
How do I prevent my child from sliding?
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
Adapted from slides by Marty Stepp and Stuart Reges
CSc 110, Autumn 2017 Lecture 8: More Graphics
CSc 110, Autumn 2016 Lecture 20: Lists for Tallying; Text Processing
Presentation transcript:

Adapted from slides by Marty Stepp and Stuart Reges CSc 110, Autumn 2016 Lecture 28: 2D Structures Adapted from slides by Marty Stepp and Stuart Reges

What is the right structure? You want to store a bunch of colors so you can later choose one at random. Batting order of a baseball team. Students names and their grades on a project. Friends names and their phone numbers Height, width and location of a sports field. Movies a person has watched. Items in a shopping cart. A student's grades.

What is the right structure? The grades for all students in a class All books in a store arranged by category Many recipes each containing many steps Phone numbers that have been called this month on a phone plan divided by area and country code for billing simplicity

Exercise Write a program that allows a user to ask the distance between two friends. If person 1 and person 2 are friends then they are distance 0 If person 2 is friends with a friend of person 2 they are distance 1 What structure is appropriate for this problem?