JavaScript Program; How to Modify

JavaScript.

JavaScript
JavaScript

You will be modifying a JavaScript program. JavaScript is a powerful computer language which works with browser software to add buttons, menus, etc.

This assignment will be out of 1000 possible points.

Getting started:
  • Right-click on the link hello_java.html and choose “Save Link As…”
  • Save the link to your desktop.

This will create a file called “hello_java” on your desktop. You can open this in a text editor (such as Notepad or Notepad++ for Windows or Text edit or BBEdit for Mac).

  • To open the file in a text editor, do not just double-click on “hello_java”. Either right click on the icon and choose your text editor, or open the text editor and open hello_java from there.
Tips:
  • Play with the web page before editing it.
  • Read through the web page code before you edit it.
  • Quickly view the website code within the browser by right-clicking on the web page and selecting “View page source” (or keyboard shortcut Ctrl-U).
  • Pay attention to the comments within the website code.
  • Firefox and Internet Explorer are the recommended browsers (Chrome and Safari sometimes have problems displaying the web page).
  • Notepad++ for Windows and BBEdit for Mac are better alternatives to Notepad and Text edit. (See Assignment 2 for download links.)
Required Items:
  • Add the current date, which should update to reflect whatever day it is when viewed. (100 points) The script that accomplishes this is already in the file, but as a comment.
  • Read the comments carefully. They will explain what to do.
  • Modify the file so that it is possible to say two more things (other than hello and hate), such as “I like [person’s name]” and “I love [person’s name]”. To accomplish this, you will need to make the appropriate changes in two places:
  • Add two new options to the pull-down menu (100 points, 50 points each). Currently, there are the options Hate and Hello. Add two more, such as Love and Like.
  • Add two new cases to the function my_function (100 points, 50 points each). This means that when the user selects Love or Like, the appropriate response will be displayed when the user clicks the “Greet” button.
  • The pull-down menu only shows one item at a time. Make it so two items are displayed at a time.

Note: This only shows up properly in Internet Explorer and Firefox. (100 points)

  • The left edge of the text-box (next to NAME) should be lined up with the left edge of the menu below it.
  • Add spaces to push the text box to the right. (100 points)
  • Look in the source code. A couple spaces have already been added.
    The spacing need not be perfect, just closer.
  • There is a hyperlink that goes to the class web page. It has several problems, which you will fix. The hyperlink says “Place your mouse on and off of this”.
  • Change the background color action:
    -When the mouse first hovers over the text, the background will turn yellow. Make it turn pink instead. (100 points)
    -After the mouse moves off the text, the background remains the same color.                                                                                                                        -Alter this so that moving the mouse off the text changes the                     background to blue. (100 points)                                                                            -The command for turning the background blue works the same way as the code that changes it to yellow (or pink), except it is “onMouseOut” instead of “onMouseOver”.
  • Change the text and the URL for the hyperlink:
  • Replace “Place your mouse on and off of this” with new text, indicating that the person is going to your personal web page (Assignment 2). (50 points)
  • Replace the URL with the URL of your personal web page. If you did not complete Assignment 2, you may use any URL. (50 points)
  • UPLOAD your “hello_java.html” file to your server (in the public_html folder), so it appears at http://people.ucsc.edu/~yourusername/hello_java.html.
Extra credit:

Add a hyperlink on your personal website (Assignment 2) that links to your JavaScript website (Assignment 3).

  • Make it easy to find and use the text “HI THERE”. (100 points)

Computer Station; Java project

Computer Station.

Computer Station
Computer Station

You run four computer labs. Each lab contains computer stations that are numbered as shown in the table below:-

Lab Number
Computer Station Numbers

1; 1-5

2; 1-6

3; 1-4

4;1-3

Each user has a unique five-digit ID Number. Whenever a user logs on, the user’s ID, Lab Number, and the computer station are transmitted to your station.

For example, if user 49193 logs onto station 2 in Lab 3, your system receives (49193, 2, 3) as input data.

Similarly, when a user logs off a station, your system receives the Lab Number and computer station number.

Write a computer program that could be used to track, by lab, which user is logged onto which computer.

For example, if user 49193 is logged into station 2 in lab 3 and user 99577 is logged into station 1 of lab 4, then your system might display the following:-

Lab Number Computer Stations

1 1: empty 2: empty 3: empty 4: empty 5: empty

2 1: empty 2: empty 3: empty 4: empty 5: empty 6: empty

3 1: empty 2: 49193 3: empty 4: empty

4 1: 99577 2: empty 3: empty

Task:-

Create a menu that allows the administrator to simulate the transmission of information by manually typing in the login or logoff data. Whenever someone logs in or out, the display table should be updated.

Write a search option so the administrator can type in a user Id and the system will output what Lab Number and station number the user is logged into, or “None” if the user Id is not logged into any computer station.

You should use a fixed array of length 4 for the labs. Each array entry points to a dynamic array that stores the user login information for each respective computer station.

Sample Output:- (User input is in bold and Italics)
LAB STATUS Lab

# Computer Stations 1 1: empty 2: empty 3: empty 4: empty 5: empty 2 1: empty 2: empty 3: empty 4: empty 5: empty 6: empty 3 1: empty 2: empty 3: empty 4: empty 4 1: empty 2: empty 3: empty

MAIN MENU

0) Quit 1) Simulate login 2) Simulate logoff 3) Search 1 Enter the 5 digit ID number of the user logging in: 12345 Enter the lab number the user is logging in from (1-4): 2 Enter computer station number the user is logging in to (1-6): 3

LAB STATUS Lab

# Computer Stations 1 1: empty 2: empty 3: empty 4: empty 5: empty 2 1: empty 2: empty 3: 12345 4: empty 5: empty 6: empty 3 1: empty 2: empty 3: empty 4: empty 4 1: empty 2: empty 3: empty

MAIN MENU

0) Quit 1) Simulate login 2) Simulate logoff 3) Search 2 Enter the 5 digit ID number of the user to find: 12345 User 12345 is logged off.

LAB STATUS Lab

# Computer Stations 1 1: empty 2: empty 3: empty 4: empty 5: empty 2 1: empty 2: empty 3: empty 4: empty 5: empty 6: empty 3 1: empty 2: empty 3: empty 4: empty 4 1: empty 2: empty 3: empty

MAIN MENU

0) Quit 1) Simulate login 2) Simulate logoff 3) Search

Digital Logic Design; Signed Multiplier

Digital Logic Design.

Digital Logic Design
Digital Logic Design

Signed Multiplier; Digital Logic Design

Create a 4 bit Signed Multiplier with the following specifications:

INPUTS

A; 4 bit 2’s complement binary number. This could be positive or negative.
B; 4 bit 2’s complement binary number. This could be positive or negative.

OUTPUT:

8 bit 2’s complement binary number (This could be a positive or negative number)

The overall circuit should look like this:

At a minimum, the circuit must be implemented using controlled inverts and an unsigned multiplier as discussed in class:

NOTES

1) The Controlled Inverts and Unsigned multiplier must be implemented as sub-circuits as demonstrated in class. These sub-circuits are used to build the 2’s Complement Signed Multiplier.

2) You are only allowed to use the basic gates: AND, OR, XOR, NOT.

3) You are NOT allowed to use Logisim’s built in circuits (i.e. Adders and Multiplexers). However, you are allowed to use the basic gates to build your own Adders and Multiplexers.

4) Once completed, please ZIP your CIRC file in the following format: CS212_Lastname_Firstname.zip.