Sie sind auf Seite 1von 3

2a) The video is being used to depict my reminder app.

The first screen is a welcome screen,


with options to go to the other screens. Upon clicking the start button, the input screen shows.
Here, the user enters the alert into a text box as well as the time it occurs. When they click the
input button, the text on it changes to Thank You, and the user can either return to the start
screen or go to the alert screen. At the alert screen the most recently entered alert will be
displayed as well as the time it was set to occur. If there has been no alerts entered since the
app activated, then the alert screen will display no current alerts in place of the event. The
reason I created iReminder was so that people that have trouble remembering short term plans
will be able to keep up with their tasks.

2b) The program began simply, as a welcome screen with a text input box and an alert screen.
However, I scrapped this design when I realized that there was no way to link the text in the
input box to the alert screen. Instead, I chose to separate the text input box into the input screen
so I could have the space to add a button in between inputting the text and having the text show
up on the alerts. The next problem was attempting to stop the user from simply overwriting the
previous alert with a space on accident. Towards this goal, I figured that before the text from the
input replaced the text of the alert by clicking the button, the text of the button itself would hide
and reveal a label below that said Thank You! This stopped the user from double clicking the
button and therefore replacing the alert with a blank space. Lastly, I had to figure out how to
make the alert screen make sense in all cases. I started with one label saying Today you have
to and then the alert but it didn't work for alerts not taking place that day. I tried after that The
latest alert is plus the alert and made a separate box instead for the date.

2c)
var alerts = 0;
...
if (alertNum <= 2) {
alertNum = alertNum + 1;
setText("numberCount", "Alerts Today: " + alertNum);
} else if ((alertNum > 10)) {
alertNum = 0;
showElement("label3");
}
In this part of the code, the code tracks how many alerts have been entered in so far. If the
number of alerts grows too large, it could slow down the app and lead to problems with data
being lost. To stop this, after a certain number of alerts, all data in the app is wiped and the
counter is reset. This algorithm depends on the the input button that transfers text from the input
screen to the alert screen to add 1 to the counter every time its clicked. In turn, this counter tells
the function that if the number of alerts exceeds 10 and tells the app to start over the counter.
Without it the app will start to slow down until eventually it crashes from information overload.
Altogether the algorithm works together to make sure that the number of alerts doesnt exceed a
certain number.
2d)
var remind = getText("alertInput");
var date = getText("dateInput");
...
onEvent("inputBtn", "click", function() {
hideElement("label3");
setText("inputBtn", "Thank You!");
setText("reminderLbl", "Your latest reminder is " + remind);
setText("dateLbl", "At " + date);
This part of the app controls the user input of the input screen. Once the user clicks on the input
button the text changes to Thank You! At the same time, the text boxes on the alert screen
change to what the user put in the box. What the user doesn't see is the changing values on the
alert screen, only seeing the finished results.

3)
var remind = getText("alertInput");
var date = getText("dateInput");
var alertNum = 0;
onEvent("startBtn", "click", function() {
setScreen("inputScreen");
});
onEvent("alertBtn", "click", function() {
setScreen("alertScreen");
});
onEvent("gotoalertBtn", "click", function() {
setScreen("alertScreen");
});
onEvent("gotostartBtn", "click", function() {
setScreen("startScreen");
});
onEvent("returnBtn", "click", function() {
setScreen("startScreen");
setText("inputBtn", "Enter Into Database");
});
if (alertNum <= 2) {
alertNum = alertNum + 1;
setText("numberCount", "Alerts Today: " + alertNum);
} else if ((alertNum > 2)) {
alertNum = 0;
showElement("label3");
}
});

Das könnte Ihnen auch gefallen