2.2 I Have a Dream
Q: 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?
A: Event driven programming is programming that is affected by the outside world. In the I have a Dream app, tapping the screen was the event handler. It was used to initiate the button which then played the audio.
Q: 2. Is it possible to create an app without event driven programming? Explain.
A: No, as someone still has to run the program, which could be by a mouse click, the time changing, or even tapping the phone.
Q: 3.What elements and components make up the User Interface (UI) for the I Have A Dream app?
A: The components used for the UI were two labels, a button, and a player.
Q: 4.What are some of the elements that make up the UI for a car? A vending machine?
A:The UI for a car would be things like the steering wheel, the turn signal, and the ignition. For a vending machine it would be the coin slot, the return change button, and the numberpad.
2.3 The Internet and the Cloud
Q: 1. In your own words, give a sentence that would explain to a friend the difference between the WWW and the Internet.
A: The WWW is more of a window into what content other people post onto the internet. I always thought of it like electricity, the WWW is the product, like a lightbulb, while the internet is the electricity to keep it running.
Q: 2. As an app developer, what is your responsibility with regard to user data? Which commandments should serve as your guide on this point?
A: My responsibility regarding user data is to protect their privacy, keeping it invisible to everyone, including me. This could be things such as passwords, which in today's society one password can ruin someone's life. Commandments that would guide this point are 3, 4, and 8. These talking about stealing someone else's property. Whether this be someone's ideas, passwords, or even private information from them.
A: The WWW is more of a window into what content other people post onto the internet. I always thought of it like electricity, the WWW is the product, like a lightbulb, while the internet is the electricity to keep it running.
Q: 2. As an app developer, what is your responsibility with regard to user data? Which commandments should serve as your guide on this point?
A: My responsibility regarding user data is to protect their privacy, keeping it invisible to everyone, including me. This could be things such as passwords, which in today's society one password can ruin someone's life. Commandments that would guide this point are 3, 4, and 8. These talking about stealing someone else's property. Whether this be someone's ideas, passwords, or even private information from them.
2.5. Mobile Apps and Mobile Devices
Q: Give an example of a special purpose computer that you are familiar with and briefly describe its hardware and its software.
1. One special purpose computer is a digital watch. Its hardware would be things like the casing, the masking, and the lights that light up the screen.
Q:Explain in your own words the difference between running your app by "Connecting to the Companion" and running your app by "Packaging" it.
2. Connecting to the companion automatically translates the code for the app, it also can change when changes are made on the browser. Packaging changes it into binary code and then makes it an apk file.
Q: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.)
3. It would take approximately 7 million bytes for the Harry Potter books, exactly the same amount as the characters. You could fit the whole novel series 1000 times on a 7 gigabyte flashdrive.
1. One special purpose computer is a digital watch. Its hardware would be things like the casing, the masking, and the lights that light up the screen.
Q:Explain in your own words the difference between running your app by "Connecting to the Companion" and running your app by "Packaging" it.
2. Connecting to the companion automatically translates the code for the app, it also can change when changes are made on the browser. Packaging changes it into binary code and then makes it an apk file.
Q: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.)
3. It would take approximately 7 million bytes for the Harry Potter books, exactly the same amount as the characters. You could fit the whole novel series 1000 times on a 7 gigabyte flashdrive.
2.6 Algorithm Basics
Q: 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?
A: 0
Q:Write a pseudocode algorithm that implements the algorithm you used to calculate this total.
A: 1. Set running total to zero. 2. For each number in list:
3. If number is even
4. Add to running total
5.if number is odd
6. Subtract from running total.
7. Print Result.
A: 0
Q:Write a pseudocode algorithm that implements the algorithm you used to calculate this total.
A: 1. Set running total to zero. 2. For each number in list:
3. If number is even
4. Add to running total
5.if number is odd
6. Subtract from running total.
7. Print Result.
2.8 Abstractions
Q: Write an explanation of abstraction, including at least one example, in your own words.
A: An abstraction is taking bits and pieces out of something, while still keeping it understandable. One example of this would be texting.
Q:Give 2-3 examples of abstractions in every day life not identified in the lecture.
A:My first example would be texting, as most people tend to shorten words while still keeping it understandable. Another example would be road signs, as they don't completely explain what they mean on the sign, but we know what they mean because we are taught what they mean.
Q: Consider an example of software, a mobile application, or a web site and explain how it is an abstraction.
A: Any website uses abstraction, as there are things we don't see that makes the website work.
A: An abstraction is taking bits and pieces out of something, while still keeping it understandable. One example of this would be texting.
Q:Give 2-3 examples of abstractions in every day life not identified in the lecture.
A:My first example would be texting, as most people tend to shorten words while still keeping it understandable. Another example would be road signs, as they don't completely explain what they mean on the sign, but we know what they mean because we are taught what they mean.
Q: Consider an example of software, a mobile application, or a web site and explain how it is an abstraction.
A: Any website uses abstraction, as there are things we don't see that makes the website work.
2.9 Binary Numbers
Q: Figure out what decimal value is represented by the following binary number 0011 1010 0011
A: 931
Q: Represent the decimal value 517 as a binary number.
A:0010 0000 0101
Q: 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?
A:It has 8 digits. They are in decimal and binary 0 (000), 1(001), 2(010), 3(011,) 4(100), 5(101), 6(110). and 7(111)
Q: Suppose the number 523 is a base-8 octal number. What would its value be in decimal? In binary?
A: In binary 523 would be 101 001 011, while in decimal it would b 331.
Q: Challenging: Convert the base-5 number 243 into decimal.
A:73
A: 931
Q: Represent the decimal value 517 as a binary number.
A:0010 0000 0101
Q: 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?
A:It has 8 digits. They are in decimal and binary 0 (000), 1(001), 2(010), 3(011,) 4(100), 5(101), 6(110). and 7(111)
Q: Suppose the number 523 is a base-8 octal number. What would its value be in decimal? In binary?
A: In binary 523 would be 101 001 011, while in decimal it would b 331.
Q: Challenging: Convert the base-5 number 243 into decimal.
A:73
2.10 Logic Abstactions
Q:(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?
A: The symbol is the most abstract folowed by the table then the circuit being the least abstract.
You place them based on how much information can be obtained from each.
Q: 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?
A:The physical circuit would be the least abstract, ten the diagram, then the binary digit would be the most abstract.
A: The symbol is the most abstract folowed by the table then the circuit being the least abstract.
You place them based on how much information can be obtained from each.
Q: 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?
A:The physical circuit would be the least abstract, ten the diagram, then the binary digit would be the most abstract.