User:Andrew Daniele
About Me
Name | Andrew Daniele |
IRC | adaniele87 |
GitHub | adaniele87 |
Blog | adaniele87 |
adaniele1 |
if you need to contact me here is my schedule:
(I check my emails during studying and catchup time)
Human senecaStudent;
senecaStudent = new Human("1987-12-18", "Daniele", "Andrew");
while (senecaStudent.inSemester())
{
senecaStudent.wakeUp();
senecaStudent.eatBreakfast();
senecaStudent.setAlertStatus("on");
switch(day)
{
case 1:
case 2:
case 3:
case 4:
case 5:
senecaStudent.takeBus("school", "home");
senecaStudent.takeBus("home", "school");
senecaStudent.doHomework();
senecaStudent.eatDinner();
senecaStudent.playWith("whiteboard");
senecaStudent.study();
break;
case 6:
senecaStudent.catchUp("school", 40); // in percent
senecaStudent.eatDinner();
senecaStudent.catchUp("school", 30);
break;
case 7:
senecaStudent.work();
senecaStudent.eatDinner();
senecaStudent.catchUp("school", 30);
senecaStudent.playWith("whiteboard");
break;
}
senecaStudent.setAlertStatus("off");
senecaStudent.sleep();
}
Other
Programming Code of the update:
unfortunately I wasn't able to utilize this in the assignment, but I thought I'd share. It's simple, it's elegant, it's efficient. If the user were to go past strLen+1, this would patch up NULL bytes between the string and the character inserted could then be displayed by the display method as it printed everything up to the first NULL byte.
while(!editStr[--i]) // patches NULL bytes to join string
{
editStr[i] = ' ';
}