1. In your own words, describe what event driven programming is. What event handler was used in the I Have a Dream app? How was it used? Event driven programming is programming that is determined by a user's actions, such as clicking the mouse or pressing a key. The event handler used was the button pressed to start the "I Have a Dream" speech. When tapped, the app would start playing the audio file of the "I Have a Dream" speech.
2. Is it possible to create an app without event driven programming? Explain. It is possible to create an app with no event driven programming, however the user will not be able to do anything on it. An event could happen when the app is started but the user would have no control.
3. What elementsand components make up the User Interface (UI) for the I Have A Dream app? The UI for the I Have a Dream app was made up of the button, the labels, the audio, the picture, and the background.
4. What are some of the elements that make up the UI for a car? A vending machine? Some elements of the UI for a car are the dashboard, the radio, the speedometer, and the temperature. Some elements of the UI for a vending machine are the buttons to choose what you want from the machine.
2.3 The Internet and The Cloud Reflections
1. In your own words, give a sentence that would explain to a friend the difference between the WWW and the Internet. The Internet is a global system of computer networks while the World Wide Web is an application of the Internet.
2. As an app developer, what is your responsibility with regard to user data? Which commandments should serve as your guide on this point? As an app developer, your responsibility with regard to user data is to make sure that a user's data is protected and secure. The 2nd commandment (You shall not interfere with other people's computer work), and the 3rd commandment (You shall not snoop around in other people's computer file) should serve as guidelines. You should not interfere with a user's work or snoop through their data.
3. Give an example of a violation of Computer Ethics Commandment 10 -- i.e., describe a consequence of an app that would be disrespectful of someone. The 10th Commandment of Computer Ethics is "You shall always use a computer in ways that ensures consideration and respect for your fellow humans." Some apps, such as one I just found called "Gossip", could be used to spread false rumors about other people which is a complete violation of the 10th commandment. Apps, and computers in general, should be used with good intentions not bad ones.
2.5 Mobile Apps and Mobile Devices Reflections
1. Give an example of a special purpose computer that you are familiar with and briefly describe its hardware and its software. A special purpose computer that I use frequently is a calculator. I use a TI-84 Plus calculator. The calculator’s hardware consists of a CPU, Flash ROM, RAM, a display, I/O, and a USB. The software consists of the programs that allow it perform algebraic functions. It uses the Algebraic Operating System.
2. Explain in your own words the difference between running your app by "Connecting to the Companion" and running your app by "Packaging" it. Running an app by connecting to the companion only lasts temporarily, while running it by packaging downloads the app, therefore it is not temporary.
3. As we learned in this lesson, a byte is about the same amount of memory as a character, such as the letter 't'. There are approximately 7 million characters in all of the Harry Potter novels combined. How many bytes of memory would all of the Harry Potter novels take up? How many copies of the Harry Potter novels would fit on a 7 Gigabyte flash drive. (Remember 1 Gigabyte is 1 billion bytes.) The Harry Potter novels would take up about 7 million bytes of memory. Therefore, approximately 1,000 copies of the Harry Potter novels could fit on a 7 gigabyte flash drive.
2.6 Algorithm Basics Reflections
1. (POGIL) Suppose you had a list of positive numbers such as 5, 10, 12, 13, 6, 7, 1, 3, 2, 1. And suppose for each of the numbers in the list you added the number to a running total if it is even and subtracted it if it is odd. What result would you get for this list of numbers? The result would be 0.
2. (POGIL) Write a pseudocode algorithm that implements the algorithm you used to calculate this total.
Set the running total to zero
For each number on the list
If the number is even add to the running total
Else subtract the number from the running total
Print the running total when all numbers have been used once (added or subtracted from the total)
3. In this lesson you learned about pseudocode. Write an algorithm in pseudocode for washing a stack of 5 cups and saucers, where the rule is that cups are washed in hot water and saucers in cold water. Use indentation to make your algorithm easy to read and identify those parts of your algorithm that are examples of Sequence, Selection, and Repetition.
Pick what to wash first; cups or saucers
If you choose cups
turn on hot water
Else
turn on cold water
If hot water is on
wash cup with soap
rinse in hot water
dry cup
repeat step 7 through 9 until all 5 cups are washed
Else
turn on cold water
wash saucer with soap
rinse in cold water
dry saucer
repeat step 11 through 15 until all 5 saucers are washed
2.8 Abstraction Reflections
1. Write an explanation of abstraction, including at least one example, in your own words An abstraction is a simplification of something. It removes the unnecessary details and only keeps the details that are useful. An example would be a map.
2. Give 2-3 examples of abstractions in every day life not identified in the lecture. A movie trailer is an abstraction of a movie because it removes some details of the movie while keeping the details that are necessary to get people to come see the movie. Also, a science textbook includes the general concepts and the important details, while removing some of the smaller information and details.
3. Consider an example of software, a mobile application, or a web site and explain how it is an abstraction. Apps, websites, and software programs are all forms of abstraction because rather than showing the user the complex coding and data being processed, they just show you the UI which is much more simple to use.
2.9 Binary Numbers Reflections
1. Figure out what decimal value is represented by the following binary number 0011 1010 0011 931
2. Represent the decimal value 517 as a binary number. 1000000101 3. The binary number system is base 2 and has 2 digits. The decimal number system is base 10 and has 10 digits. The octal system is base 8. How many digits does it have? What are they, starting at 0? The octal system has 8 digits; 0, 1, 2, 3, 4, 5, 6 and 7.
4. Suppose the number 523 is a base-8 octal number. What would its value be in decimal? In binary? In decimal it would be 339. In binary it would be 101 010 011.
5. Challenging: Convert the base-5 number 243 into decimal. 73
1. (POGIL) Consider these three things: The OR gate (i.e., the physical circuit), the Boolean OR function (as defined by its truth table), and the OR symbol. How would arrange them from most abstract to least abstract? And what criterion would you use to determine their order? The most abstract is the OR symbol, then the Boolean OR function, and the least abstract is the OR gate. The most abstract is the symbol because it's just a symbol. It doesn't show you anything and you would not have a clue what it meant if you did not learn about it. Then the OR function because it shows more detail than the symbol, it shows the symbols function and can be more easily understood. The OR gate is the least abstract because it is the physical thing that the symbol and the function because it is what those two things are describing.
2. Consider these three things: A binary digit (e.g., 1 or 0), the flip-flop circuit diagram, and the flip-flop circuit (i.e., the physical circuit). How would you arrange them from most abstract to least abstract and what criterion would you use to determine their order? The most abstract is the binary digit, then the flip-flop circuit diagram, and the physical circuit is the least abstract. The binary digit could be easily mistaken for an actual 0 or 1. The diagram is a depiction of something, therefore it takes away unnecessary details, and only keeps the important ones, therefore it is an abstraction. The least abstract is the physical circuit because it is not more abstract than a diagram of a circuit or a picture. It is the real thing, therefore it is not abstract.