Questions
Create, test, and validate an HTML document that has a form with the following controls: a....

Create, test, and validate an HTML document that has a form with the following controls:

a. A text box to collect the user's name

b. Four checkboxes, one for each of the following items:

i. Four 25-watt light bulbs for $2.39

ii. Eight 25-watt light bulbs for $4.29

iii. Four 25-watt long-life light bulbs for $3.95

iv. Eight 25-watt long-life light bulbs for $7.49

c. A collection of three radio buttons that are labeled as follows:

i. Visa

ii. Master Card

iii. Discover

In: Computer Science

Java Script Ask the user for a Fahrenheit temperature Write the code needed to convert a...

Java Script

Ask the user for a Fahrenheit temperature
Write the code needed to convert a Fahrenheit temperature into a Celsius temperature. Use an alert box to show the result
Ask the user for a Celsius temperature
Write a function to convert from Celsius to Fahrenheit; use an alert box to show the results
Decide on two other conversions (meters to feet, pounds to kilos, other)
Ask the user for numbers to be converted; be sure to tell them what you are converting from and to
Write two more functions that will do the conversions; use an alert box to show the results
Write all results to the document, correctly formatted in complete sentences.

In: Computer Science

Create, test, and validate an HTML document for yourself, including your name, address, and email address....

Create, test, and validate an HTML document for yourself, including your name, address, and email address. If you are a student, you must include your major and your grade level. This document must use several headings and <em>, <strong>, <hr />, <p>, and <br /> tags.

In: Computer Science

The Tokenizer.java file should contain: A class called: Tokenizer Tokenizer should have a private variable that...

The Tokenizer.java file should contain:

A class called: Tokenizer

Tokenizer should have a private variable that is an ArrayList of Token objects.

Tokenizer should have a private variable that is an int, and keeps track of the number of keywords encountered when parsing through a files content.

In this case there will only be one keyword: public.

Tokenizer should have a default constructor that initializes the ArrayList of Token objects Tokenizer should have a public method called: tokenizeFile

tokenizeFile should have a string parameter that will be a file path tokenizeFile should return void tokenizeFile should throw an IOException tokenizeFile should take the contents of the file and tokenize it using a space character as a delimiter

If there are multiple spaces between tokens then ignore those spaces and only retrieve the words, so given the string: “The cat” should still only produce two tokens: “The”, and “cat”

A newline should also serve to separate tokens, for example:

If the input contains multiple lines such as:

The cat in the hat Red fish blue fish There is no space between “hat” and “Red”, just a newline, which means the resulting tokens are “hat” and “Red”, NOT a single token: “hatRed”

Each token should be added to the private ArrayList variable as a Token object If the value of a token is the keyword: public , then increment the private int counter that is keeping track of the number of keywords encountered when parsing the content of a file.

- Remember that “public” is the only keyword you have to worry about - Any letter in the word: public , can be capitalized and you must still increment the counter -

If public is part of another token, then it should NOT count as a keyword -

For example if a file contained: - Blahblahpublic -

The above public does not count as a keyword since public in this case is not its own token Every call to tokenizeFile should first clear the previous tokens from the ArrayList of Tokens, as well as reset the private int counter of keywords (public) For example: if a user calls tokenizeFile(“someFile.txt”) and it generates these tokens:

“The” , “cat”, “in” , and then the user calls tokenizeFile again but with a different input file, such as: tokenizeFile(“somenewfile.txt”), the ArrayList should no longer hold the previous tokens, and should instead hold only the new tokens generated by the new file.

Tokenizer should have only a getter for the ArrayList of Token objects (not a setter) The getter should be called: getTokens and should return an Array of Token objects, NOT an ArrayList of Token objects Tokenizer should have a method called: writeTokens writeTokens should have no input parameter writeTokens should have a return type of void writeTokens should throw an IOException writeTokens should write the tokens out to a file called: “output.txt”, and should reside in your current working directory. Each token should be written on a newline, for example - Given tokens: “The”, “cat”, “in”, “the”,”hat” The result in output.txt should be: The cat in the hat Notice the order the tokens should be written to file are in order from which they are read from the input file, which should be from left to right and from top to bottom Tokenizer should have a public method called: getKeywordCount , that has no input arguments and returns the private int keyword counter field Override the toString method inherited from the Object class, have it return the same value as calling the toString method on the ArrayList of Token objects

In: Computer Science

Explain the function/purpose of the following section of the script -- Set environment variables SET FEEDBACK...

  1. Explain the function/purpose of the following section of the script

-- Set environment variables

SET FEEDBACK OFF

SET HEADING OFF

SET VERIFY OFF

  1. Explain the function/purpose of the following section of the script

PROMPT ********** Create New Order **********

PROMPT

SELECT 'Date: ', TO_CHAR(SYSDATE,'MM/DD/YYYY') FROM DUAL;

PROMPT

  1. Explain the function/purpose of the following section of the script

DEFINE v_cus_lname = 'Customer Not Found'

DEFINE v_cus_fname = 'Customer Not Found'

DEFINE v_cus_phone = 'N/A'

  1. Explain the function/purpose of the following section of the script

ACCEPT v_cus_code NUMBER FORMAT 99999 PROMPT 'Enter Customer Code (format 99999): '

In: Computer Science

Below is an invoice sent out by MegaCorp. Order ID Order Customer Customer Customer Product Product...

Below is an invoice sent out by MegaCorp.

Order ID

Order

Customer

Customer

Customer

Product

Product

Product

Product

Ordered

Date

Num

Name

Address

ID

Description

Finish

Standard Price

Quantity

1006

10/24/2018

2

HugeCorp

Chicago, IL

7

Widgets

Platinum

800

2

8

Widgets

Chrome

790

4

5

Wadgets

Cherry

325

2

4

Scaffolding

Silver

650

1

1007

10/25/2018

6

LittleCorp

Edwardsville, IL

7

Widgets

Platinum

800

1

11

Ladder

Silver

275

3

1008

10/26/2018

2

Huge Corp

Chicago, IL

5

Wadgets

Cherry

325

2

4

Scaffolding

Silver

650

1

STEP 1:

Convert the above to 1NF

  1. Provide a relation of the above INVOICE, underlining the primary keys.

STEP 2:

Consider the following functional dependencies of the invoice data:

OrderID à OrderDate, CustomerNum, CustomerName, CustomerAddress

ProductID à ProductDescription, ProductFinish, ProductStandardPrice

STEP 3:

Convert your 1NF table to 2NF. (i.e., look only at non-key attributes that are dependent on a single PK)

A relation is in 2NF if it contains no partial functional dependencies.

  1. Provide me 2NF relations based on the dependencies above. BE CAREFUL:   I am NOT asking you to do 3NF yet!!

STEP 4:

Now, you’ve realized there are some additional functional dependencies:

CustomerNum à CustomerName, CustomerAddress

Convert your 2NF relations to 3NF based on the dependencies you just received.

In: Computer Science

Please only edit the list.cpp file only, implement the push_front method that will insert a new...

Please only edit the list.cpp file only, implement the push_front method that will insert a new element to the front of the list.

//list.h

// Doubly linked list
#ifndef Q2_H
#define Q2_H

template<typename T> class List;
template<typename T> class Iterator;

template <typename T>
class Node {
   public:
       Node(T element);
   private:
       T data;
       Node* previous;
       Node* next;
   friend class List<T>;
   friend class Iterator<T>;
};

template <typename T>
class List {
   public:
       List(); // Constructor
       ~List(); // Destructor
       void push_front(T element); // Inserts to front of list
       Iterator<T> begin(); // Point to beginning of list
       Iterator<T> end(); // Point to past end of list
   private:
       Node<T>* head;
       Node<T>* tail;
   friend class Iterator<T>;
};


template <typename T>
class Iterator {
   public:
       Iterator();
       T get() const; // Get value pointed to by iterator
       void next(); // Advance iterator forward
       void previous(); // Advance iterator backward
       bool equals(Iterator<T> other) const; // Compare values pointed to by two iterators
   private:
       Node<T>* position; // Node pointed to by iterator
       List<T>* container; // List the iterator is used to iterate
   friend class List<T>;
};

#endif

//list.cpp

// Implement the push_front method

#include <string>
#include "q2.h"

using namespace std;

// Node class implemenation

template <typename T>
Node<T>::Node(T element) { // Constructor
   data = element;
   previous = nullptr;
   next = nullptr;
}

// List implementation

template <typename T>
List<T>::List() {
   head = nullptr;
   tail = nullptr;
}


template <typename T>
List<T>::~List() { // Destructor
   for(Node<T>* n = head; n != nullptr; n = n->next) {
  
       delete n; //Deconstructor create an error evertime i ran it.
   }

}

template <typename T>
void List<T>::push_front(T element) {
   // Your code here
}


template <typename T>
Iterator<T> List<T>::begin() {
   Iterator<T> iter;
   iter.position = head;
   iter.container = this;
   return iter;
}

template <typename T>
Iterator<T> List<T>::end() {
   Iterator<T> iter;
   iter.position = nullptr;
   iter.container = this;
   return iter;
}

// Iterator implementation

template <typename T>
Iterator<T>::Iterator() {
   position = nullptr;
   container = nullptr;
}


template <typename T>
T Iterator<T>::get() const {
   return position->data;
}

template <typename T>
void Iterator<T>::next() {
   position = position->next;
}

template <typename T>
void Iterator<T>::previous() {
   if (position == nullptr) {
       position = container->tail;
   } else {
       position = position->previous;
   }
}

template <typename T>
bool Iterator<T>::equals(Iterator<T> other) const {
return position == other.position;
}

list_test.cpp

// Test for push_front method
#include <iostream>
#include "q2.h"
#include "q2.cpp"
using namespace std;

int main() {
   List<string> stack;
   stack.push_front("My");
   stack.push_front("name");
   stack.push_front("is");
   stack.push_front("Ozymandias");
   stack.push_front("king");
   stack.push_front("of");
   stack.push_front("kings");

   // Should print - kings of king Ozymandias is name My
   for (auto p = stack.begin(); !p.equals(stack.end()); p.next())
       cout << p.get() << " ";
   cout << endl;

}

In: Computer Science

The probability that a telephony call will last t minutes can be approximated as - Probability...

The probability that a telephony call will last t minutes can be approximated as -

Probability that call lasts less than t minutes =1 - e-t/a

Where e = Euler’s constant (2.71828) and a = average call duration

Using the above probability function, write a program in C that

a. takes the average call duration (a) from the user,

b. then accepts the call duration to find the probability for (t) and

c. then calculates and prints the probability that a call lasts less than t.

The program should repeat the sequence of operations a to c until the user enters a value of 0 for either variable a or t in the steps a or b above

In: Computer Science

What is the Association for Computing Machinery (ACM) Information Systems Security write a paragraph summarizing it.

What is the Association for Computing Machinery (ACM) Information Systems Security
write a paragraph summarizing it.

In: Computer Science

Please what is wrong with this two code that is showing error message when run them?...

Please what is wrong with this two code that is showing error message when run them?

>>>data =[1,2,3,4] >>>reduce(lambda x,y:x+y,data) #Produce the sum 10 >>> reduce(lambda x,y:x*y, data) # Produce the product 24

___________________________________________________________________________________________________________-

def sum(lower,upper): “””Returns the sum of the numbers from lower to upper.””” if lower> upper: return 0 else: return reduce(lambda x,y:x+y, range(lower, upper+1))

In: Computer Science

Normalization. You have a relation PET as below: PET (OwnerID, PetID, OwnerFName, OwnerLName, PetName, PetCategory, PetBreed,...

  1. Normalization. You have a relation PET as below:

PET (OwnerID, PetID, OwnerFName, OwnerLName, PetName, PetCategory, PetBreed, BreedDescription)

You also know that each attribute value is a single value and the functional dependencies as below:

fd1: OwnerID, PetID → OwnerFName, OwnerLName, PetName, PetCategory, PetBreed, BreedDescription

fd2: OwnerID → OwnerFName, OwnerLName

fd3: PetBreed → BreedDescription

  1. Is the relation in 1NF? Why? If not, normalize it to 1NF. You need to list ALL relations and the functional dependencies of each relation after you finish.
  2. For all the relation(s) you got from above normalization process, are they in 2NF? Why? If not, normalize them to 2NF. You need to list ALL relations and the functional dependencies of each relation after you finish.
  3. For all the relation(s) you got from above normalization process, are they in 3NF? Why? If not, normalize them to 3NF. You need to list ALL relations and the functional dependencies of each relation after you finish.

In: Computer Science

2. Let BT Node be the class we often use for binary-tree nodes. Write the following...

2. Let BT Node be the class we often use for binary-tree nodes. Write the following recursive methods: (a) numLeaves: a method that takes a BT Node T as parameter and returns the number of leaves in the tree rooted at T. (b) isEven: a boolean method that takes a BT Node T and checks whether its tree is strictly binary: every node in the tree has an even number of children.

3. Suppose you want to improve Merge Sort by first applying Heap Sort to a number of consecutive subarrays. Given an array A, your algorithm subdivides A into subarrays A1, A2 · · · Ak, where k is some power of 2, and applies Heap Sort on each subarray Ai alone. The algorithm proceeds into merging pairs of consecutive subarrays until the array is sorted. For example, if k = 4, you first apply Heap Sort to sort each Ai and then you merge A1 with A2 and A3 with A4, then you apply the merge function once to get the sorted array. (a) Does the proposed algorithm improve the asymptotic running time of Merge Sort when k = 2? How about the case k = log n (or a power of 2 that is closest to log n)? Justify. (b) Is the proposed algorithm stable? Is it in-place? Prove your answers.

4. Write a clear pseudocode for Breadth-First Search (BFS) in undirected graphs. How would you modify your code to compute the number of connected components in the input graph? Give details about the used data structures and the running time.

5. Write a clear pseudocode for Depth-First Search (DFS) in graphs. How would you modify your code to check whether the graph is acyclic?

6. The centrality of a vertex v in an undirected graph G is measured as follows: c(v) = n1(v) + n2(v) + · · · nd(v) where ni(v) is the number of vertices at distance i from v (e.g., n1(v) is the number of neighbors of v) and d is the maximum distance between v and a vertex of the same connected component as v in G (so d = 0 if v is isolated). Write the pseudocode of a most-efficient algorithm that computes the centrality of a vertex v in a given graph G. What is the running time of your algorithm? Prove your answer.

In: Computer Science

A one-page, 250 word document persuading your most influential stakeholder why it's important to consider security...

  1. A one-page, 250 word document persuading your most influential stakeholder why it's important to consider security and risk when designing the IT systems for your Park Area.

In: Computer Science

Read the free ebook Cost Estimating in an Agile Development Environment by Alvin Alexander, which discusses...

Read the free ebook Cost Estimating in an Agile Development Environment by Alvin Alexander, which discusses estimating software costs. Find one or two other references on ways to measure software development costs. In your own words, write a two-page paper that explains how to estimate software development costs using at least two different approaches.

In: Computer Science

/** * Write a recursive function that accepts a stack of integers and * replaces each...

/**

* Write a recursive function that accepts a stack of integers and

* replaces each int with two copies of that integer. For example,

* calling repeatStack and passing in a stack of { 1, 2, 3} would change

* the stack to hold { 1, 1, 2, 2, 3, 3}. Do not use any loops. Do not use

* any data structures other than the stack passed in as a parameter.

* @param stack

*/

public static void repeatStack(Stack<Integer> stack) {}

In: Computer Science