| 
									
										
										
										
											2019-05-05 00:41:44 +03:00
										 |  |  | package main | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | // --------------------------------------------------------- | 
					
						
							|  |  |  | // EXERCISE: Warm-up | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | //  Create and print the following maps. | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | //  1. Phone numbers by last name | 
					
						
							|  |  |  | //  2. Product availability by Product ID | 
					
						
							|  |  |  | //  3. Multiple phone numbers by last name | 
					
						
							|  |  |  | //  4. Shopping basket by Customer ID | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | //     Each item in the shopping basket has a Product ID and | 
					
						
							|  |  |  | //     quantity. Through the map, you can tell: | 
					
						
							|  |  |  | //     "Mr. X has bought Y bananas" | 
					
						
							|  |  |  | // | 
					
						
							|  |  |  | // --------------------------------------------------------- | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | func main() { | 
					
						
							|  |  |  | 	// Hint: Store phone numbers as text | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// #1 | 
					
						
							|  |  |  | 	// Key        : Last name | 
					
						
							| 
									
										
										
										
											2019-05-05 00:47:55 +03:00
										 |  |  | 	// Element    : Phone number | 
					
						
							| 
									
										
										
										
											2019-05-05 00:41:44 +03:00
										 |  |  | 
 | 
					
						
							|  |  |  | 	// #2 | 
					
						
							|  |  |  | 	// Key        : Product ID | 
					
						
							|  |  |  | 	// Element    : Available / Unavailable | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// #3 | 
					
						
							|  |  |  | 	// Key        : Last name | 
					
						
							|  |  |  | 	// Element    : Phone numbers | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | 	// #4 | 
					
						
							|  |  |  | 	// Key        : Customer ID | 
					
						
							|  |  |  | 	// Element Key: | 
					
						
							|  |  |  | 	//   Key: Product ID Element: Quantity | 
					
						
							|  |  |  | } |