You may work individually or in groups of 2 people to finish this project. Your programming project should be your group's effort and not the effort of other persons. If you have questions or need assistance with your program, the instructor and the TAs are very willing to help and are available during their office hours and through the Collaboration Center.
Check out the page on programming tips to help you. Also, look at the Labs 2 &3 grading criteria and the PP 2 grading criteria to see the breakdown of the points given for this project.
When you complete your project, create a link to it from your course web page, and copy it to the web server. Make sure that the project works correctly after you have published it.
Recommendation: Upload your modified page at the end of each step or clean breaking point, as a backup.
Good programs include good indentation, good variable names, and comments that help the author (or someone else) understand who developed the program and what is going on. (See the grading criteria to see how comments and program style are evaluated.)
togglePause()
, for example.)
false
.
togglePause
function:
true
and the text on the button should
be changed to "Resume". If the button is clicked while the pet
is paused, then the variable should be changed to
false
and the text on the button should be changed
back to "Pause".
disabled
property that can be set
to true
or false
, as in
wheremyBtn.disabled = true
ormyBtn.disabled = false
myBtn
is the id of a button.
Once the virtual pet simulation is functioning properly, hide the
state and counter text fields by changing their visibility
style attribute to "hidden". (You can do this in a
<style>
section in the <head>
or in a
style="..."
attribute in the field tags.) Invisible fields
still take up space on the page, so you may want to move these fields to
the bottom of the page
make it less obvious that they are there when invisible.
Add a button so that the user can choose to make those two fields visible. If you want, you can make this button toggle back and forth between showing and hiding the state and counter (making them "visible" or "hidden"), similar to the Pause button.
- Make sure that you have updated the "Author:" and "With assistance from:" comments at the top of your source file.
- Double-check that you have included all other appropriate comments
Make sure that you have used clear variable and function names, and that your indentation helps to clarify your program's logic.
- at the top of the file,
- before every function, and
- inside functions where there are code blocks that could use explanation.
- Upload your modified page(s) to the web server.
- Recopy your state diagram so that it matches your current virtual pet simulation. Turn the state diagram in to Kit.