Questions
A manufacturing company produces products. The following product information is stored: product name, product ID and...

A manufacturing company produces products. The following product information is stored: product name, product ID and quantity on hand. These products are made up of many components. Each component can be supplied by one or more suppliers. The following component information is kept: component ID, name, description, suppliers who supply them, and products in which they are used. Show table names, primary keys, attributes for each table, relationships between the entities including all constrains required.

Assumptions in your database design:

• A supplier can exist without providing components.

• A component must be associated with a supplier.

• A component must be associated with a product.

• A product cannot exist without components.

Design your database and implement it by providing all the required DDL and DML SQL statement to create the needed database objects and populate the tables with data. Make sure you included all required constraints and appropriates column datatypes.

Submit:

Write the sql code for creating these tables (the DDL statements).

Write query and update DML in SQL that must contain a where condition.

INSERT must populate all columns

Provide at least three statements for each type of DML • All needed constraints. Make sure you name all your constraints.

In: Computer Science

Please, i need Unique answer, Use your own words (don't copy and paste). *Please, don't use...

Please, i need Unique answer, Use your own words (don't copy and paste).

*Please, don't use handwriting.

<ol>

<li id="Y"><a href ="home.php">HOME </a> </li>

<li ><a id ="Z" href ="login.php">LOGIN </a> </li>

<li><a href ="register.php">REGISTER </a> </li>

</ol>

<p>This is First paragraph </p>

<p>This is Second paragraph with a

   <a href="link1.html">link 1</a>

</p>

<br />

<a href="link2.html">link 2</a>

<p class="X"> This is Third Paragraph</p>

<p class="X"> This is Fourth Paragraph</p>

Write the CSS rules needed to:

  1. Change the color of the link Login to Yellow
  1. Change the color of the link (link 1) to green
  1. Change the color of the third and the fourth paragraphs to red
  1. Change the color of the remainder of the Web page text to blue

In: Computer Science

The Project is: 1. Create a new Java program which implements a simple PacMan-type text game...

The Project is:

1. Create a new Java program which implements a simple PacMan-type text game which contains the

following functionality:

A) At program startup, constructs and displays a 2-dimensional grid using standard array(s) (no

collection classes allowed) with the size dynamically specified by the user (X and Y sizes can

be different). Places the PacMan in the upper-left corner of the grid facing left All grid cells

should have the empty cell character of ‘.’ except for the start position of the PacMan which

will have the appropriate PacMan symbol (see below). Also 15% of your grid (rounded down if

necessary) should contain cookies randomly located on the grid except for the initial PacMan

position. The grid must be displayed after each command.

B) Use these symbols for the grid:

1. Cookie symbol – shows were cookies are in the grid ('O')

2. Empty symbol – shows empty unvisited grid cells ('.') (dot)

3. Visited symbol – shows grid cells where the PacMan has visited (' ') (space)

4. PacMan symbol depends on the current PacMan facing direction.

1. Left ‘>’

2. Up ‘V’

3. Right ‘<’

4. Down ‘^’

C) A menu of commands must be provided and must be displayed when appropriate. At a

minimum the menu should consists of the following commands (the command number is what

the user should enter to execute the command):

1. Menu – Display the menu of commands.

2. Turn Left – turns the PacMan left (counter-clockwise) but the PacMan stays in its current

location

1. Current: up, new: left

2. Current: right, new up

3. Current: down, new right

4. Current: left, new down

3. Turn Right – turns the PacMan right (clockwise) but the PacMan stays in its current location

1. Current: up, new: right

2. Current: right, new down

3. Current: down, new left

4. Current: left, new up

4. Move – Moves the PacMan one grid location in the facing direction if possible.

5. Exit – exits the program displaying the game statistics of the number of total moves and the

average number of moves per cookie obtained.

2. The main processing cycle is the following:

A) The grid must be displayed after each command showing the effects of the command.

B) Optionally display the list of commands

C) Display the grid

D) Accept user input. Code will be provided for reading user input.

1. If an invalid command is entered, an appropriate error message should be displayed and the

menu of commands and grid gets redisplayed. An invalid command does not count as a

command in the statistics.

2. Process the command and add one to the number of commands entered if it is a move

command.

3. If the user enters the Exit command, the program will display the number of commands and

the average number of commands per cookie.

E) If the resulting move places the PacMan over a cookie, indicate the cookie was eaten and add

one to the number of cookies eaten for the program statistics.

The solution on CHEGG does not solve the problem. The user has to input the rows and columns. PacMan needs to turn left, right, and move forward only. I am posting what I have so far below. I still need to figure out the turn, the move forward, the disappear dots/ cookies, and the statistics on exit. import java.util.Scanner; import java.util.Random; public class AssignmentMP1_dspicer83 { public static void main(String[] args) { // Creation of variables int play = 0; int columns = 0; int rows = 0; int cookies = 0; Random rnd = new Random(); Scanner scn = new Scanner(System.in); boolean quit = false; String [][] playArea; int area = 0; String menu = "Select from the following Menu\n" + "\t1. Display Menu\n" + "\t2. Turn Left\n" + "\t3. Turn Right\n" + "\t4. Move Forward\n" + "\t5. Exit"; //User input starts here while (!quit) { System.out.println("Welcome to my PacMan game \n" + "Would you like to play? \n" + "Press 1 to play and 2 to quit"); play = scn.nextInt(); if (play == 1) { // Game Play //columns is an x value System.out.println("How many columns would you like?"); columns = scn.nextInt(); //rows is an y value System.out.println("How many rows would you like?"); rows = scn.nextInt(); //Array created area = rows * columns; playArea = new String[rows][columns]; //calculate amount of cookies cookies = (int) ((columns * rows) * 0.15); //Any size and type String selectedIndex = ""; //create random variable Random rand = new Random(); //populates play area with PacMan and dots for(int i=0;i"; } else playArea[i][j]="."; } } //Any number< totalEmenent for(int i=0; i< cookies; i++) { int selectIndex = rand.nextInt(area); //generate random until its unique while(selectedIndex.indexOf(String.valueOf(selectIndex))> 0) { selectIndex = rand.nextInt(area); } //test if is original value selectedIndex = selectedIndex+selectIndex; int xCord = (int)selectIndex/playArea[0].length; int yCord = selectIndex%playArea[0].length; if(xCord == 0 && yCord == 0) { i--; } else playArea[xCord][yCord]="O"; } //Options Menu System.out.println(menu); //Main Game loop while (!quit) { //Print Grid for(int i=0;i")) { } break; case 3: //Turn Right break; case 4: //Move Forward break; case 5: //Exit System.out.println("Thanks for playing STATS"); quit = true; break; default: System.out.println("Please select options 1 - 5"); } } } else if (play ==2) { //User exit out of game System.out.println("Thank you for checking out my PacMan game. Please come back and play."); quit = true; } else { //in input is not 1 or 2, loops back to input start System.out.println("Not a valid option"); } } } }

In: Computer Science

Please explain this C++ below on how to get the following outputs (see code) #include <iostream>...

Please explain this C++ below on how to get the following outputs (see code)

#include <iostream>

using namespace std;

// Tests for algorithm correctness
// -------------------------------
// 1 gives output "1 3   7 15 31 63 127 255 511 1023 2047"
// 2 gives output "2 5 11 23 47 95 191 383 767 1535 3071"
// 3 gives output "3 7 15 31 63 127 255 511 1023 2047 4095"
// 5 gives output "5 11 23 47 95 191 383 767 1535 3071 6143"

// Global variables
int X;
int I;

int main()
{
    cout << "Enter starting value: ";
    cin >> X;

    cout << X;
    cout << " ";

    for (I = 1; I <= 10; ++I)
    {
        if ((X & 1) == 0)
        {
            X = X + 3;
        }
        else
        {
            X = (2 * X) + 1;
        }
        cout << X << " ";
    }
    cout << endl

In: Computer Science

USING PYTHON Our gift-wrapping department has ran out of wrapping paper. An order for more wrapping...

USING PYTHON

Our gift-wrapping department has ran out of wrapping paper. An order for more wrapping paper needs to be placed. There is a list, generated by the orders department, of the dimensions (length (l), width (w), and height (h)) of each box that needs to be gift wrapped. The list provides the dimensions of each box in inches, l×w×h.

We only need to order exactly as much wrapping paper as is needed and no more.

Fortunately, each package that needs gift wrapping is a cuboid. Which means that you can find the amount of gift-wrapping paper each box requires by finding the total surface area of the cuboid,

surface area=2(lw)+2(wh)+2(hl).

In addition to the surface area of the cuboid, you must also account for loss in the gift-wrapping production process. Each gift-wrapped box requires a loss amount, of wrapping paper, equal to the side of the cuboid with the smallest surface area.

For example

  • A box with dimensions 6x2x3 has l=6, w=2, and h=3, with surface area equal to 2(6⋅2)+2(2⋅3)+2(3⋅6)=72 and loss equal to 2⋅3=6. So, the total amount of wrapping paper needed for the 6x2x3 package is 78 square inches.

Using the list of boxes that need to be gift-wrapped, write a Python function that outputs the total number of square feet of wrapping paper that needs to be ordered.

https://courses.alrodrig.com/4932/boxes.txt

In: Computer Science

using SANS policy template for "clean disk policy", create a scenario related to it. list the...

using SANS policy template for "clean disk policy", create a scenario related to it. list the details of the policy.

In: Computer Science

Give a CFG and (natural) PDA for the language { ai bj ck ef: i +...

Give a CFG and (natural) PDA for the language { ai bj ck ef: i + j = k + f, i, j, k, f ≥ 0 }

In: Computer Science

Undecidability .20 marks Let L1 = {M | M is a TM that halts on the...

Undecidability .20 marks

Let L1 = {M | M is a TM that halts on the empty tape leaving exactly two words on its tape in the form Bw1Bw2B} where B represents Blank like w1 w2 . (a) The problem of deciding whether an arbitrary Turing machine will accept an arbitrary input is undecidable. Prove formally using problem reduction, that given an arbitrary Turing machine M, the problem of deciding if M ∈ L1 is undecidable.

(b) Is L1 recursive, recursively enumerable, non-recursively enumerable, uncomputable? Justify your answer.

In: Computer Science

Q3) Our implementation of a doubly list relies on two sentinel nodes, header and trailer. Re-implement...

Q3) Our implementation of a doubly list relies on two sentinel nodes, header and trailer. Re-implement the DoublyLinkedList without using these nodes.

I want the answer to be a text not on a paper please

class DoublyLinkedList:

public class DoublyLinkedList {

public static class Node{

private E element;

private Node prev;

private Node next;

public Node(E e, Node p, Node n){

element = e;

prev = p;

next = n;

}

public E getElement() {

return element;

}

public Node getPrev() {

return prev;

}

public Node getNext() {

return next;

}

public void setPrev(Node p) {

next = p;

}

public void setNext(Node n) {

next = n;

}

}

private Node header;

private Node trailer;

private int size = 0;

public DoublyLinkedList(){

header = new Node<>(null,null,null);

trailer = new Node<>(null, header, null);

header.setNext(trailer);

}

public int size(){

return size;

}

public boolean isEmpty(){

return size ==0;

}

public E first(){

if(isEmpty())

return null;

return header.getNext().getElement();

}

public E last(){

if(isEmpty())

return null;

return trailer.getPrev().getElement();

}
}

In: Computer Science

An analysis of the emergency services responding to a hazardous chemical incident needs to be performed....

An analysis of the emergency services responding to a hazardous chemical incident needs to be performed. In the scenario analyzed, some youths had broken into a farm and disturbed some chemicals in sacking. One of the youths had been taken to the hospital with respiratory problems, whilst the others were still at the scene. The police were sent to investigate the break-in at the farm. They called in the fire service to identify the chemical and clean up the spillage. The overall analysis shows four main sub-goals: receive notification of an incident, gather information about the incident, deal with the chemical incident, and resolve the incident. Perform a hierarchical task analysis for the above scenario. [Hint your answer should demonstrate all features of HTA Notations such as Selection, Iteration, Sequence and Unit task]

In: Computer Science

Write down a while loop that calculates and displays the SQUARE of ten ODD numbers (from...

Write down a while loop that calculates and displays the SQUARE of ten ODD numbers (from 1 to 19) in a loop style execution:

C++

In: Computer Science

1000-1200 WORDS Choose an existing web site that you think can be improved or you have...

1000-1200 WORDS

Choose an existing web site that you think can be improved or you have experienced problems with and explore the site thoroughly.

  1. Introduction. List the name and URL of the web site you have chosen, summarize the major purpose(s) of the site, and describe briefly your experience with the web site.
  2. Problems and Recommendations Use the Eight Golden Rules: to organize your content (eight subheadings), but please feel free to go beyond these eight rules if you like. For each evaluation criteria/rule, be sure to describe the positive aspects of the web site, the negative aspects, and also make constructive suggestions for revisions, whenever necessary. Your suggestions should cover low-level items such as spelling, fonts, colors, layouts, and so on; middle-level aspects such as consistency, error handling, writing style, menu design, etc.; and high- level concepts such as navigation, audience appeal, privacy protection, cultural and global aspects, accessibility, etc.
  3. Use CITATIONS if necessary and when necessary.
  4. List REFERENCES at the end.
  5. 1000-1200 Words
  6. Please make is so I will be able to copy and paste it

In: Computer Science

Question Objective: The purpose of this lab is for you to become familiar with Python’s built-in...

Question

Objective:

The purpose of this lab is for you to become familiar with Python’s built-in text container -- class str -- and lists containing multiple strings. One of the advantages of the str class is that, to the programmer, strings in your code may be treated in a manner that is similar to how numbers are treated. Just like ints, floats, a string object (i.e., variable) may be initialized with a literal value or the contents of another string object. String objects may also be added together (concatenation) and multiplied by an integer (replication). Strings may also be compared for “equality” and arranged into some order (e.g., alphabetical order, ordering by number of characters, etc.). Finally, strings may be placed in containers which can then be passed as arguments to functions for more complex manipulations.

Specifications:

Write an interactive Python program composed of several functions that manipulate strings in different ways. Your main() function prompts the user for a series of strings which are placed into a list container. The user should be able to input as many strings as they choose (i.e., a sentinel-controlled loop). Your main function will then pass this list of strings to a variety of functions for manipulation (see below).

The main logic of your program must be included within a loop that repeats until the user decides he/she does not want to continue processing lists of strings. The pseudo code for the body of your main() function might be something like this:

# Create the main function

def main():

# declare any necessary variable(s)

# // Loop: while the user wants to continue processing more lists of words

#

# // Loop: while the user want to enter more words (minimum of 8)

# // Prompt for, input and store a word (string) into a list # // Pass the list of words to following functions, and perform the manipulations

# // to produce and return a new, modified, copy of the list.

# // NOTE: None of the following functions can change the list parameter it

# // receives – the manipulated items must be returned as a new list.

#

# // SortByIncreasingLength(…)

# // SortByDecreasingLength(…)

# // SortByTheMostVowels(…)

# // SortByTheLeastVowels(…)

# // CapitalizeEveryOtherCharacter(…)

# // ReverseWordOrdering(…)

# // FoldWordsOnMiddleOfList(…)

# // Display the contents of the modified lists of words

#

# // Ask if the user wants to process another list of words

Deliverable(s):

Your deliverable should be a Word document with screenshots showing the sample code you have created, and discuss the issues that you had for this project related to AWS and/or Python IDE and how you solved them.

Submit the program you develop including captured output. Also turn in screen captures from running your program inputting, as a minimum, three (3) sets word lists (no fewer than 8 words per list).

In: Computer Science

L ={x^a y^b z^c | c=a+b} a) Prove that L is not regular. b)Prove by giving...

L ={x^a y^b z^c | c=a+b}

a) Prove that L is not regular.

b)Prove by giving a context-free grammar that the L is context free.

c)Give a regular expression of the complement L'.

In: Computer Science

C++ Create a class called Musicians to contain three functions string ( ), wind ( )...

C++

Create a class called Musicians to contain three functions string ( ), wind ( ) and perc ( ).

Each of these functions should initialize a string array to contain the following instruments:
    - veena, guitar, sitar, sarod and mandolin under string ( )
    - flute, clarinet saxophone, nadhaswaram and piccolo under wind ( )
    - tabla, mridangam, bangos, drums and tambour under perc ( )

It should also display the contents of the arrays that are initialized.

Create a derived class called TypeIns to contain a function called get ( ) and show ( ). The get ( ) function must display instruments as follows:

Type of instruments to be displayed
   a.    String instruments
   b. wind instruments
   c.    Percussion instruments

The show ( ) function should display the relevant detail according to our choice. The base class variables must be accessible only to its derived classes.

In: Computer Science