Questions
A new company is planning to build a new database system for holding information about customers...

A new company is planning to build a new database system for holding information about customers and salesmen. ‘Customers’, ‘Salesmen’ and ‘Customers_Salesmen’ are part of the information that the new company wants to store in the new database. These tables are shown below in figure 1, figure 2 and figure 3. The new company intends to use MySQL for building the new database.

Customer_ID

Customer_Name

Customer_City

Customer_Grade

3002

Ahmad Salman

New York

100

3007

Mazen Ali

New York

200

3005

Sami Khalil

California

200

3008

Ashraf Ahmad

London

300

3004

Manal Faris

Paris

300

3009

Tahani Mahdi

Berlin

100

3003

Fawzi Jama

Moscow

200

3001

Tareq Mohsen

London

100

Figure 1: Customers table

Salesman_ID

Salesman_Name

Salesman_City

Salesman_Commission

5001

Naser Hamad

New York

0.15

5002

Rami Farhan

Paris

0.13

5006

Salem Alawi

Paris

0.14

5003

Faten Morad

San Jose

0.12

5007

Turkey Fahad

Rome

0.13

5005

Juma Khalaf

London

0.11

Figure 2: Salesmen table

Customer_ID

Salesman_ID

3002

5001

3007

5001

3005

5002

3008

5002

3004

5006

3009

5003

3003

5007

3001

5005

Figure 3: Customers_Salesmen table

Based on the above three tables, answer the following 6 questions:

  1. Write an SQL statement for creating the customer table that is shown in figure 2. No need to write any SQL statement for adding any record to the customer table.  
  2. Write an SQL statement for adding one record to the customer table that was created in question-1 above. The added record should be one of the records that are given in the customer table.   
  3. Write an SQL statement to list the information of salesmen who work in Paris.
  4. Write an SQL statement to list all customer names who work with the salesman whose id is 5001.                                                                                                                           \
  5. Write an SQL statement to list all customer names who work with the salesman whose commission is 0.13.                                                                                                          ]
  6. Write an SQL statement to increase the salesman commission by 5%.

In: Computer Science

Explain each of the following (in your own words): a. The 3 fundamental rules of subprograms...

Explain each of the following (in your own words):

a. The 3 fundamental rules of subprograms

b. Subprogram

c. Subprogram call

d. Subprogram Header

e. Parameter profile/Protocol

f. Formal Parameter–v-Actual Parameter

g. Procedure –v-Function

h. Design issues for subprograms

i. Stack dynamic –v-static variables

j. Parameter passing

i. In-mode

ii. Out-mode

iii. In-Out mode

1.Pass by result

2.Pass by reference

3.Pass by name

k. Design issues for parameter passing

l. Overloaded subprogram

m. Generic subprogram

n. Design issues for functions

In: Computer Science

Given the following data set N =9 12 3 78 89 22 31 5 20 14...

Given the following data set N =9

12 3 78 89 22 31 5 20 14

a ) sort the data using: Insertion and Selection sorts

Determine thee number of comparisons and the number of moved for every sort.

b) Sort the data using Heap and bubble sort, show all steps

In: Computer Science

Question1: Consider the below description of the class Box. 1. Create a class and call it...

Question1: Consider the below description of the class Box. 1. Create a class and call it Box. Box has the following methods & variables a. Variable for length, height, width & volume, b. setlength(int x ) method to set the length, c. setWidth (int y ) method to set the width, d. setHeight (int z ) method to set the height & e. displayCalculatedVolume( ) method that calculates the volume and displays it. (Hint: volume = length*width*height)

In: Computer Science

A geographic information system is a conceptualized framework that provides the ability to capture and analyze...

A geographic information system is a conceptualized framework that provides the ability to capture and analyze spatial and geographic data. Discuss the following. If required, include the pictures. (20marks)

1. Definition and explanation of GIS
2. Components of GIS
3. Data and Data Sources of GIS
4. GIS Applications

In: Computer Science

3.11 Develop an EE- Diagram for the dental group described above. Expand it by assuming that...

3.11 Develop an EE- Diagram for the dental group described above. Expand it by assuming that there are multiple dentists with some of the dentists being surgeons, who can perform oral surgery. Also assume some of the professionals are dental hygienists, who can perform routine work such as cleaning and taking x-rays A patient typically begins an ordinary visit by starting with a dental hygienist who performs routine work, and then a dentist who does a checkup during the same initial visit. The work needed is usually determined at this visit. If follow-up visits are required, each of the next visits will be with one dentist. If a patient requires oral surgery, at least one of his or her visits must be with one of the surgeons even though the rest of the work needed might be performed by his or her regular dentist. When surgery is performed, there must be a qualified assistant present. Only some of the hygienists are qualified to assist in surgeries. Assume this database does not keep track of appointments, only of actual visits, work, billing, and payments.

In: Computer Science

Create a sub class of the class Box and call it SBox. The SBox class has...

Create a sub class of the class Box and call it SBox. The SBox class has inherited the list of variables and methods from Box & has its own members too.

a. It has a variable color having a String data type.

b. This class also has a method called SetColor( ) which read the color from the user (Use JOptionPane), set the color to the value given by the user and display it.

In: Computer Science

Using C ++, Given the following data set N =9 12 3 78 89 22 31...

Using C ++, Given the following data set N =9

12 3 78 89 22 31 5 20 14

a ) sort the data using: Insertion and Selection sorts

Determine thee number of comparisons and the number of moved for every sort.

b) Sort the data using Heap and bubble sort, show all steps

In: Computer Science

Override the methods below (in SBox). The overridden methods should perform the actions mentioned below and...

Override the methods below (in SBox). The overridden methods should perform the actions mentioned below and it and must display the following message “Overridden method X”, where X is the method name.

a. setlength(int x ), to set the length

b. setWidth (int y ) to set the width

c. setHeight (int z) to set the height & d. displayCalculatedVolume( ) that calculates the volume and displays it.

In: Computer Science

In designing a university-wide student information system for Cambridge, it is necessary to meet the usability...

In designing a university-wide student information system for Cambridge, it is necessary to meet the usability requirements of various groups, including (among to others

(i)   Staff working in college tutorial offices, and

(ii) People applying online for admission as graduate students.

  1. In what respects would the usability requirements of these two groups be likely to differ?                                                                                                [2 marks]
  1. Discuss THREE (3) usability properties concerning both groups and explain how it can be achieved.                                                          [6 marks]
  1. Create a form and write EIGHT (8) questions based on heuristic evaluation to evaluate the interactive design.                              [8 marks]
  1. Suggest TWO (2) specific interaction features that might address the needs of these different users.                                                                     [4 marks]

In: Computer Science

Write an error-free Java program to do the following things. Prompt the user to input a...

Write an error-free Java program to do the following things.

Prompt the user to input a set of numbers. The numbers represent hourly wages so they will be between 7.25 (peon) and 50 (big boss). The user should be able to input up to 35 numbers but if the user enters 0 then the data input ceases. All of the data that the user enters should be stored in a single array. You do not need to check the input data to see if it is in the proper range – assume the user will input correct data.

The program should calculate the average, the variance and the kurtosis of the numbers that were entered. The equation for the average is given in the book. The formula for the variance and the kurtosis (fourth centralized moment) is given by

Variance = SIGMA (xi-x(bar))^2/(n-1)

kurtosis = SIGMA ((xi-x(bar))^4/(n*var)^2) - 3

where xi are the individual numbers, n is the number of data points, var is the variance, and is the average of the sample. Kurtosis gives an indication of how “peaked” the data samples are relative to a normal (Gaussian) distribution.

The kurtosis must be calculated via a call to a method.

At the end, the program should repeat all of the numbers on one line and then print the average, variance, and kurtosis of the data sample.

MM§MEnter a data value (0 to quit)
¼¼§M10.5
MM§MEnter a data value (0 to quit)
¼¼§M48
MM§MEnter a data value (0 to quit)
¼¼§M8.25
MM§MEnter a data value (0 to quit)
¼¼§M8.50
MM§MEnter a data value (0 to quit)
¼¼§M20
MM§MEnter a data value (0 to quit)
¼¼§M0
MM§Msize = 5
MM§MThe data values are . . .
MM§M10.5 48.0 8.25 8.5 20.0
MM§MThe average is 19.05
MM§MThe variance is 285.0125
MM§MThe kurtosis is -1.1934395407885128


Remember to put the usual header at the top of the program and to submit via Canvas.

In: Computer Science

Java language. Create the following Java command line iterator application Lab4. Pass in three arguments when...

Java language.

Create the following Java command line iterator application Lab4. Pass in three arguments when the program starts.

For example java Lab4 4 3 5

The command line arguments get passed into the main method as a String array in the variable object named args. Remember they get passed in as strings so you need to parse them into integers using the Integer.parseInt(args[X]) before you can treat them as integers. Create four sections that perform the following functions.

  1. Create a for loop iteration structure: loop the number of times of args[0] passed in, printing the counter value each time to the command line
  2. Create while loop iteration structure: loop the number of times of args[1] that was passed in, printing the counter value each time to the command line
  3. Create a do loop iteration structure: loop the number of times of args[2] that was passed in, printing the counter value each time to the command line
  4. Create a for each iteration structure to iterate through the args[] array printing the value in each element to the command line screen

In: Computer Science

[Design Pattern] Think of a scenario that can be solved using all of these 3 patterns...

[Design Pattern] Think of a scenario that can be solved using all of these 3 patterns - Strategy, Factory and Abstract Factory patterns.

1. Write the Scenario

2. Write the code for the 3 patterns

3. Create the UML diagram

In: Computer Science

In this question, you are going to implement a human vs. human version of Notakto. Notakto...

In this question, you are going to implement a human vs. human version of Notakto.

Notakto is a tic-tac-toe variant. It is played across three 3 x 3 boards: Board A, board B and board C. When you start the game you should output the boards as follows.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1:
There are two players: Player 1 and player 2. Player 1 always starts. Both players play the same piece: X. E.g., let player 1 choose location 6 on board A, i.e., the user will enter A6. The output of the program should be as follows (bold font represents user input).

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2:
Each player takes turn placing an X on the board in a vacant space (a space not already occupied by an X).

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2: A7
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X X 8 6 7 8 6 7 8
Player 1:
If a board has three X in a row, column, or diagonal, the board is dead and it cannot be played anymore. It should not be displayed anymore. E.g., in the following, board A becomes dead and is not displayed anymore.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2: A7
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X X 8 6 7 8 6 7 8
Player 1: A8
B C
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 2:
The game ends when all the boards contain three X in a row, column, or diagonal, at which point the player to have made the last move loses the game. Unlike tic-tac-toe, there will always be a player who wins any game of Notakto.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: A6
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X 7 8 6 7 8 6 7 8
Player 2: A7
A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
X X 8 6 7 8 6 7 8
Player 1: A8
B C
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 2: B0
B C
X 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 1: B4
B C
X 1 2 0 1 2
3 X 5 3 4 5
6 7 8 6 7 8
Player 2: C0
B C
X 1 2 X 1 2
3 X 5 3 4 5
6 7 8 6 7 8
Player 1: C4
B C
X 1 2 X 1 2
3 X 5 3 X 5
6 7 8 6 7 8
Player 2: C8
B
X 1 2
3 X 5
6 7 8
Player 1: B8
Player 2 wins game
Note that you should check for legal moves. If the users enters something illegal you should prompt them again. Let's play a new game to illustrate this.

A B C
0 1 2 0 1 2 0 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 1: C0
A B C
0 1 2 0 1 2 X 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 6 7 8
Player 2: B9
Invalid move, please input again
Player 2: fds
Invalid move, please input again
Player 2: C0
Invalid move, please input again
Player 2: C6
A B C
0 1 2 0 1 2 X 1 2
3 4 5 3 4 5 3 4 5
6 7 8 6 7 8 X 7 8
Player 1: C6
Invalid move, please input again
Player 1: C3
A B
0 1 2 0 1 2
3 4 5 3 4 5
6 7 8 6 7 8
Player 2: C2
Invalid move, please input again
Player 2:
Implement the game and try to pass all test cases. The list of test cases is not complete. We may add more test cases when marking after the deadline.

Yo

I want the answer in python

In: Computer Science

describe at least 4 online legal reconnaissance activities


describe at least 4 online legal reconnaissance activities

In: Computer Science