CPI310 – JavaScript Short #1
JavaScript Fundamentals
Topics:
• JavaScript fundamentals
• Console output
• Use of Arrays
• Use of Strings
• Creation of Functions
• Front End HTML/CSS
• HTML Forms
• Front End JavaScript
Description
This assignment will put you through the paces of solving some problems with
JavaScript. There will be several small challenges that you can solve.
Use the following Guidelines:
• Give identifiers semantic meaning and make them easy to read (examples numStudents, grossPay, etc).
• Keep identifiers to a reasonably short length.
• Adopt a coding standard and be consistent. Suggestion:
o Use upper case for constants. Use title case (first letter is upper case) for classes. Use camelCase for all other identifiers (variables, methods, objects).
• Use tabs or spaces to indent code within blocks (code surrounded by braces). This includes classes, methods, and code associated with ifs, switches and loops. Be consistent with the number of spaces or tabs that you use to indent.
• Use white space to make your program more readable.
Important Note:
All submitted assignments must begin with the descriptive comment block. To avoid
losing trivial points, make sure this comment header is included in every
assignment you submit, and that it is updated accordingly from assignment to
assignment.
/*
Author:
Date:
Description:
*/
November 2020
Programming Assignment:
Instructions:
Login Reveal
Create an html form that has a button labeled “Login” on it.
When the user clicks it, it should reveal a text field, a password field and two
buttons: login and close
Specifications:
Functionality:
Create a button called “login”
When the user clicks this button, it should reveal a log-in interface.
When the user clicks “reset”; the form should return to simply being the login
button.
Code Requirements:
You should create a javaScript file for this with functions to be invoked through
the “onclick” event in the html buttons.
These functions should grab the HTLM Form element by an id and change the
innerHTML to cause the changes.
Web Skill/Aesthetics:
Make a site full of LOREM IPSUM text. With a combination of HTML and CSS, put
your form in the upper right corner. Give everything a pleasant style with CSS.
To generate the sample output, I based the ‘navbar’ HTML & CSS on an exercise
found on w3Schools.com – the form code is original.
Grading of Programming Assignment
The TA will grade your program following these steps:
(1) Compile the code. If it does not compile a U or F will be given in the
Specifications section. This will probably also affect the
Efficiency/Stability section.
(2) The TA will read your program and give points based on the points allocated
to each component, the readability of your code (organization of the code and
comments), logic, inclusion of the required functions, and correctness of the
implementations of each function.
Rubric:
What to Submit?
You are required to submit your solutions in a compressed format (.zip). Zip all
files into a single zip file. Make sure your compressed file is labeled correctly
– lastname_firstname_LogInForm.zip
The compressed file MUST contain the following:
•
• index.html
• styles.css
• index.js (basic Node.js backend)
Include any other files you need to show your project working in your zip.
If multiple submissions are made, the most recent submission will be graded, even
if the assignment is submitted late.
Remember:
first name. Do not include the < >.
Where to Submit?
All submissions must be electronically submitted to the respected homework link in the course shell (Canvas) where you downloaded the assignment.
Academic Integrity and Honor Code.
You are encouraged to cooperate in study group on learning the course materials. However, you may not cooperate on preparing the individual assignments. Anything that you turn in must be your own work: You must write up your own solution with your own understanding. If you use an idea that is found in a book or from other sources, or that was developed by someone else or jointly with some group, make sure you acknowledge the source and/or the names of the persons in the write-up for each problem. When you help your peers, you should never show your work to them. All assignment questions must be asked in the course discussion board. Asking assignment questions or making your assignment available in the public websites before the assignment due will be considered cheating.
The instructor and the TA will CAREFULLY check any possible proliferation or plagiarism. We will use the document/program comparison tools like MOSS (Measure Of Software Similarity: http://moss.stanford.edu/) to check any assignment that you submitted for grading. The Ira A. Fulton Schools of Engineering expect all students to adhere to ASU’s policy on Academic Dishonesty. These policies can be found in the Code of Student Conduct:
http://www.asu.edu/studentaffairs/studentlife/judicial/academic_integrity.h
tm
ALL cases of cheating or plagiarism will be handed to the Dean’s office. Penalties include a failing grade in the class, a note on your official transcript that shows you were punished for cheating, suspension, expulsion and revocation of already awarded degrees.