You are on page 1of 4

3.

WRITTEN RESPONSES

3 a.
3.a.i.
The purpose is to provide an effective and efficient way to study for an AP Physics Exam. The app combines the flexibility
of code with the topic of forces in physics to create a customizable program to practice free body force problems

3.a.ii.
The functionality of the program is to respond to user interaction and inputs to check a students understanding. The app
starts on a home screen that briefs the student on how to use the program, and the student can select the begin button
to move on. The program has set diagramed answers displayed and users must select the correct free body force
diagram to match the prompt. Upon selecting the right answer students can select the continue button to move onto the
next question. Once they complete the last question users see a congratulations screen where there's a return button to
return home

3.a.iii.
The inputs in the app are the interactions from the user where they select buttons or scroll across the screen. For
example, once the program initiates the user enters an input by selecting the begin button. This has the resulting output
of directing the user to the questions screen where they begin testing. Then the input is the user selecting the buttons of
the free body force diagrams, and also selecting the continue button once they are ready to move on. The output of the
button selections are changes to the labels which give responses like "try again" or "Correct!!!" and the changing of
values, like progressing the index forward. Once the continue button is selected the output is the next set of prompt
pictures, answer pictures, and prompting labels until the user completes all questions. The output then is a changed UI to
a final congratulations screen where the user can once again add an input by selecting the return button and the program
will have an output of returning the user home

3 b.
3.b.i.
3.b.ii.

3.b.iii.
In the example provided, the name of the list that is used to provide random answers to the problem is "globalAnswers"

3.b.iv.
The data contained in the list is a series of names for images. When a name is set to a picture then that picture changes
to the image that shares that name. Each item in the list is a separate image that can be called depending on the
chosen (in this case random) index.

3.b.v.
The selected list manages complexity in the code by providing effective and efficient new answers to questions and also
incorporating an element of randomness. One way it provides efficient answers is by simply setting the image of the
known incorrect answers to a value in the list, instead of manually setting the image to the picture's name each time. It
also manages randomness, as lists require an index to retrieve the right item, which enables the creation of a random
number selection within the range of the index.
3 c.
3.c.i.

3.c.ii.

3.c.iii.
In the procedure an algorithm was made to execute steps whenever a certain answer was incorrect. So, in the image
presented there are individual procedures for answers A, B. and C for when they are wrong. The purpose of these
procedures is to set their images to a random, incorrect picture that is pulled from the list titled "globalAnswers", and
then to set their corresponding Boolean variable to false.
3.c.iv.
In the second image, the algorithms are implemented every time there is a change in questions and both images (for
answers) and variables need to change. So in the algorithm every time the continue button is clicked and the continue
variable is "true," the prompting image changes to the next item that corresponds to the index. The procedures comes
into play every time the index increases (up to a value of 4) and the incorrect question's images and variables need to be
changes. So when the index equals 2 (2nd question) the picture to Answer_A and its value (true) is manually set,
however, procedures for Answer_B and Answer_C are used to change their their values to "false" (since they are incorrect
answers), and their pictures randomly.

3 d.
3.d.i.
First call:
The first call to the procedure "Answer_B_Wrong" occurs if the variable "globalContinue" is "true" and if the "globalIndex"
equals "2".

Second call:
The first call to the procedure "Answer_B_Wrong" occurs if the variable "globalContinue" is "true" and if the "globalIndex"
equals "4".

3 d.ii.
Condition(s) tested by first call:
The conditions being tested in the first call is whether the answer has been answered correctly (globalContinue = true)
and that the first question is completed and ready to move on to the second question (index = 2).

Condition(s) tested by second call:


The conditions being tested in the second call is whether the answer has been correctly provided (globalContinue = true)
and the third question is complete and ready to move onto the fourth (index = 4)

3.d.iii.
Results of the first call:
The variable "globalPicture_B" is false, and the picture "Answer_B" is set to a random index from the list "globalAnswers"
from 1-8

Results of the second call:


The variable "globalPicture_B" is false, and the picture "Answer_B" is set to a random index from the list "globalAnswers"
from 1-8

You might also like