Language:EN
Pages: 3
Words: 61871
Rating : ⭐⭐⭐⭐⭐
Price: $10.99
Page 1 Preview
hline joe canada hline han china hline yannis ital

Hline joe canada hline han china hline yannis italy hline harris

Questions 1

Consider the followine dataent Use the Nahve Bayes algorithm to predict to which class the 5 (Doc ID) belongs?

$2

, begins with the second locker, denoted

S100

changes L100. After all the students have passed through the building and changed the lockers, which lockers are open? Write a program to find your answer. (Hint: Use a list of 100 Boolean elements, each of which indicates whether a locker is open (True) or closed (False). Initially, all lockers are closed.)

This part is based on your answer / solution to Part 1, i.e., design and implementation of the database for the TRAVELNORTH scenario.

(A) Populate the database with some sample data (e.g., you should generate your own dummy data and load it into the TRAVELNORTH database, consider 5 to 10 rows for each table and enough data to see meaningful output for the queries below).

Display details of the travel agent(s) with the most ticket sales in the month of October 2022.

Points to consider while preparing your solution to Part 2:

Questions 6

The goal for this lab is to create a few different functions that utilized lists and loops - both for loops and while loops. First, create a new file in and save it. Name the file Lab11.py. Note it MUST be called exactly Lab11.py. Any other name will cause the tests in to fail. Furthermore, you will be required to implement the functions negative_days, greetings and factorial. These must also be named exactly as specified. negative_days function First, create a function that can take a list as a parameter. The function should be called negative_days and the parameter called temp_list. The function header (the first line of the function) should look like this: def negative_days (temp_list): Within the function, write code that will loop through all of the elements of the parameter list. If a value is negative

X

is the index of the element in the list. Note that indices start at 0 . For example, the following testing code: temperatures

11

)

x

had a regative number' where

n

! represents the factorial of the positive integer

7!=1∗2∗3∗4∗5∗6∗7=5040

4!=1∗2∗3∗4=24

please remove (or comment out) any "testing" code that may generate output. This will cause the tests to fail.

Questions 7

if x is odd.

, the input 18 should give the result

[18,9,24,12,6,3]

0

and applying standard gradient

x

−α

. Question 4: 1. Identify the plot that ensures the convergence of gradient descent algorithm and why? 2. Describe how to improve the initial guess of the local search gradient descent algorithm.

Project Brief

The company decided to set up a new call centre and increase the staff for its operations. The company has given this project to Tec Matrix Pty Ltd, which is experienced in installing telecommunication set up for the organisation. The company wants to set up and install all the hardware and software devices in the new building and required planning and implementation for this project. The estimated cost of this project is $ 1.5 million. The expected timeframe for this project is two months, but it depends on the feasibility study of the given project.

HR Manager

Compliance Manager

The company has facing issues in requirements management at the workplace.

The project is having certain financial and technical risk factors associated that need to encounter by finding an alternative solution.

Discuss the requirement attributes.

Discuss the requirement change management process.

A complex number is a number made of two real numbers, one part is called the real part of the number, the other the imaginary. They are normally written in the form

a+bi

is the imaginary part and

i=

. 3. It should have a getRe() method and a getIm() method that return the values of re and im respectively. These methods should be public and return double

s

+b

1

2

the sum

a

i

=a

1

and

b

+b

1

and

a

i

+b

3

3

2

b

2

=a

+a

. This method should be public and return a Complex . 6. It should have a public tostring() method that returns a string in the format

{a^i ba^j ba^k | i+j+k (k is non) ∧i,j,k ≥ 0}

Questions 12

Questions 14

Question 5.

Project Stakeholders

Business Analyst

Problem Statement

Previously, the company has faced numerous problems in the business process. The company does not have technical management to evaluate the technical capability. Salesforce does not have the proper management to manage the technical capability for the business operation.

Your activity

In this activity, you are required to develop the business analysis performance management plan where you can assess the performance of the activities. You are required to discuss the following with your team member to manage the business analysis performance.

Resource:

ICTSAD609 Learners Guide on Moodle

Questions 15

Say we have a dict like this:

Questions 16

Q.2 Which functional dependency bolds in given relation and why? 1.

x→yz

Table 2: Q.1 Which functional dependency holds in given relation

AB→C

\&\&

BC→A

\&

Questions 17

Correction: Use these survey result for Question 4 User 1: (Expect, Dislike), User 2: (Like, Live with), User 3: (Like, Dislike), User 4 : (Like, Live with), User 5 : (Expect, Live with), User 6: (Expect, Live with), User 7 : (Like, Live with), User 8 : (Expect, Dislike), User 9 : (Expect, Live with), User 10: (Like, Live with) The above data shows Kano model survey responses for a feature, where User id: (a1, a2) represents answers to functional and dysfunctional questions from the user with that id. For example, User 1: (Like, Dislike) means the user with id 1 answered "Like" for functional question and "Dislike" for dysfunctional question. Use the method discussed on slides 8-10 in Module 6, provide the distribution of the results and round up each percentage number to a whole number

E

is

Questions 18

1. [12pts] Let

2

be a sequence of integers. Design an algorithm to find the subsequence

S

,a

)

M

time. (You may assume the product to be 1 , if the subsequence is empty.)

Questions 19

'

(41%)

, type '

AB

'

(46%)

' is typed as '

A

typed correctly as '

AB

' typed '

B

' typed as '

Questions 20

1. Construct NFAs for the following regular expressions using Thompson's construction algorithm. In addition, show the sequence of moves made by each in processing the input string

(c)

(a

(d)

Questions 21

i need help in creating the code the running score, cumulative Score nad pass to player

{

Random dice = new Random();

//allow player(s) to back to home

private void Back_Click(object sender, EventArgs e)

}

private void Enter_Click(object sender, EventArgs e)

Player1.ReadOnly = true;

Player2.ReadOnly = true;

f2.Show();

this.Hide();

int randomNum2 = dice.Next(1, 7);

switch (randomNum1)

break;

case 2:

Dice1.ImageLocation = @"C:\Users\User\OneDrive\Documents\Assignment3\DiceRoller\Dice-3.png";

Dice1.SizeMode = PictureBoxSizeMode.StretchImage;

break;

case 5:

Dice1.ImageLocation = @"C:\Users\User\OneDrive\Documents\Assignment3\DiceRoller\Dice-6.png";

Dice1.SizeMode = PictureBoxSizeMode.StretchImage;

break;

}

Dice2.SizeMode = PictureBoxSizeMode.StretchImage;

break;

case 3:

Dice2.ImageLocation = @"C:\Users\User\OneDrive\Documents\Assignment3\DiceRoller\Dice-3.png";

Dice2.SizeMode = PictureBoxSizeMode.StretchImage;

break;

case 6:

Dice2.ImageLocation = @"C:\Users\User\OneDrive\Documents\Assignment3\DiceRoller\Dice-6.png";

Dice2.SizeMode = PictureBoxSizeMode.StretchImage;

break;

{

}

P1CumulativeScore.Text = "total: " + P1RunningScore;

}

{

Application.Exit();

Part I Please select the correct answer (SINGLE choice) for each question (15 questions) 1. Computer network can be divided into wide area network, metropolitan area network and local area network, what is the basis for this division? () A. The scope of the network B. The topology of the network C. The communication methods of the network D. The transmission medium of the network 2. "Divide the total frequency bandwidth of the physical channel into several sub-channels, and each sub-channel transmits a signal", what is the name of this channel multiplexing technique for the above descriptions? () A. code division multiplexing B. frequency division multiplexing C. time division multiplexing D. space division multiplexing 3. Which of the following does not belong to the guided media? () A. Fiber optical cable B. Copper wire C. Coaxial cable D. Wireless LAN 4. Under the Go-back-

N

C.

192.168.13.25

D. Increase the length of the cable, or increase the minimal data length 7. In Ethernet, assume there are four hosts A, B, C and D. If A sends data to B, then ( ) A. Only host

B

can receive this data D. None of the four hosts can receive this data 8. Try to identify the following categories of DNS records: (www.ibm.com, servereast.backup2.ibm.com), Its type is () A. CNAME Type B. NS Type C. A Type D. MX Type

Questions 23

, inclusive of both numbers at both ends. A coin is tossed multiple times, resulting in

n1

and

Q1( b)

Process the same data in staffsalarylist in

Q2

, explain which operations are best suited for list and which operations are best suited for dictionary. Use the operations in Q2(a)

Questions 25

(c)

)

2. Convert the NFAs of the previous exercise into DFAs using the subset construction algorithm.In addition, show the sequence of moves made by the DFA in processing the input string

Questions 27

Using C# please write the following application

second array called salesArray_Double. Convert the string values from the

salesArray_String into a double. Assign that double value to the elements in the

argument to the method into the listbox with the format “$xxx,xxx.xx” such as

“$247,850.00”

the data passed as an argument and assign the result in lblHighest label displayed as

currency with zero decimal places, example: $264,448

Text version for both:

//TODO need a file header

* @author Jim Williams

* @author //TODO add your name here when you contribute.

*

* @param args unused

/**

* Tests that the RenameMe method handles all the cases described in its method header

//test 1, a happy path case (valid input) "25\n" with min 2 and max 50 should result in

// 25 being returned.

int expected = 25;

int actual = GuessTheNumber.RenameMe(input, "Enter a number between 2 and 50:",

System.out.println("testRenameMe 1) Expected " + expected + ", a valid value to " +

"be returned instead of " + actual);

}

{ //test 3, -2 is returned (DESCRIBE THE TEST CASE HERE IN PLAIN ENGLISH)

}

{ //test 5, -4 is returned (DESCRIBE THE TEST CASE HERE IN PLAIN ENGLISH)

}

{ //test 7, -6 is returned (DESCRIBE THE TEST CASE HERE IN PLAIN ENGLISH)

} else {

System.out.println("\ntestRenameMe passed; it is expected that the prompt is output");

//TODO need a file header

import java.util.Random;

* @param args unused

*/

final int HIGH_BOUND = 100;

int hiddenNum = rand.nextInt(HIGH_BOUND - LOW_BOUND +1) + LOW_BOUND;

"Enter a number between " + LOW_BOUND + " and " + HIGH_BOUND + ": ",

LOW_BOUND, HIGH_BOUND);

} else if ( guessedNum > hiddenNum) {

System.out.println("This guess is too high.");

System.out.println("This guess is invalid.");

}

public static int RenameMe(Scanner A, String B, int C, int D) {

if (A == null) {return -1;} else if (C < 0) {return -2;} else if (C > D) {return -3;}

return -5;}} else {

A.nextLine(); //read and ignore the token that isn't an integer

4. Describe the languages denoted by the following regular expressions: (a)

0(0∣1)

)

A0∗ A0∗ A0∗

(d)

)

Let's one-byte variable char flags; be a collection of flags. Let us assume further that one of the flags occupies three bits: 1,2 and 3 counting from 0 from the right. Create a collection of C \#define's for all the values that the flag may have. Show C code that can - obtain the value of the flag, - set it to one of the possible values, and - clear the flag (i.e., set it to 000 ) without affecting the values of any other flags in the

f

multiplexers to implement the followin nctions (a)

Y=

C

ˉ

)D+AD+B

B

C

ˉ

+D)

2- Discuss how to perform and mitigate Web service. Provide a scenario and discuss.

3- Discuss how to perform penetration testing using different penetration testing tools. Provide a scenario and discuss.

a

precedes the first

∣w

starts with

}

(e)

}

(f)

}

Questions 34

15. [12pts] Illustrate the operation of build heap on the array

⟨5,3,17,10,84,19,6,22,9⟩

that is already sorted in increasing order? What about decreasing order?

Questions 37

What is the default behavior for splitting the training set and test set? DSS will order the value using a time column and allocate the first half rows to training set and last half rows to test set. DSS will perform a random split and allocate

80%

1. Consider the graph shown below and use of Dijkstra's link-state routing algorithm to compute a least cost path from the source node A to all other destinations. Please show your detailed analyses and computing process. Note: You must write down your detailed analysis and computing process. NO SCORE if you ONLY provide e.g., a single number.

Questions 41

. True. When analyzing schools_data, the percentage of repeated

=1

of the records when traveltime is 2 or more

Questions 43

program such that it will create a Work_Study object: Work_Study obj_WS; Work_Study

) Obj_WS_ptr (Student *) Obj_wS_ptr (Account *) Obj_WS_ptr (** Again, there will be TWO Account objects created and you need to print the address for both) clasa Student: public Account public: Student 1

}

Write a program that prompts the user to enter the time in 12 hours notation. The program then outputs the time in 24 hours notation. Your program must contain three exception classes: - Invalidhrexception - InvalidMinException - InvalidSecException. If the user enters an invalid value for hours, then the program should throw and catch an InvalidHrException, and prompt user to re-enter the value. Similar conventions will be for the values of minutes and seconds. The following shows the UML diagrams of all the classes and their relationship that you have to implement them: Convenient to your design, feel free to change some of the methods used in the main file. Let us look at the run time analysis: Case 1: Correct input Enter hours: 8 Enter minutes: 28 Enter seconds: 38 Enter AM or PM: Am 24 hour clock time:

08:28:38

and 12 . Enter hours: 9 Enter minutes:

−8

The value of seconds must be between

θ

Question 1:

Discuss the process of bypassing client-side controls in web applications.

Questions 46

в. Construct a Turing machine to do the following: consider a machine that stats on tape that contains nothing but a string of 1's. The machine should be started on the left end of the string. This machine is designed to multiply the length of the string by 3.

Σ={a,b}

-

b

2

, the complement of

M

such that

. - Save your Standard Turing Machine as a JFLAP file, and submit that file to Canvas as your solution to this exercise.

Questions 49

that is already sorted in increasing order? What about decreasing order?

Questions 50

Note: State the principle it follows and give the reason why it follows following Security Design Principle.

Questions 51

• The method calculateAverage() receives the parameter marks array and calculates the average mark as type double with 2 decimals.

• The static method getAverage() receives two parameters: an array of Student objects and a String id. The method returns the average mark of the student identified by the id. If there is no student with that id, the returned average is 0. Assume that the student ids are distinct. 1

Using the following lines of code, construct (drag and drop) a loop that prints the numbers 1 to 10 to the terminal, earh

nn

with 42 elements in Java? boolean b

[42]

new boolean []

(42)

*Please code in Java*

The project name of this lab is Codon.

The information contained within RNA is made up of a series of chemicals called nucleotides and those chemicals are abbreviated to four letters A (adenine, C (cytosine), U(uracil), and G (guanine). When someone has their RNA sequenced then you get a sequence of these chemicals and it looks like this:

GUGUCGCGUGGGCAUUCGUAA

[skip G] UGU CGC GUG GGC AUU CGU [skip AA]

and if you start with the third one (by skipping the first two) you get

The Codon sequence is simply the nucletides grouped by threes and kept in the list called proteinSequences. This is created by adding one nucleotide at a time to our codon sequence using the method addNucleotide. You will have to take care of the grouping by three in your code. At any point you can figure out all of the protein sequences present by calling the findAllProteinSequences method which returns the number of protein sequences found. You can then extract any one of the ProteinSequences by giving an index. If the index is within the number of protein sequences found then the ProteinSequence object is returned. If the index is outside of the number of protein sequences found then a null is returned. The ProteinSequence object can be queried to find the starting codon and ending codon.

Note: Only your Program class should deal with reading the text file. It will at least do the printing of the number of sequences and the start and stop, but will delegate printing the list of sequences to the print method of the Codon class.

GGA

GGC

ACG

UGG

UGU

Number of Sequences: 1 Sequence: 1 Start Codon: 0 Stop Codon: 6

CCA

CUG

CUA

CCC

AGG

CCU

GUG

GAG

UGA

Questions 55

Include the appropraite validations in the application.

In case the validation failed, display a message in a label that "Data not saved" (red color)

Questions 57

SUMMARY

c. public static void main (String args[ ]) \{\} d. public static void main (String args( )) [] 24. What is the purpose of the else block in an if/else statement? a. To contain the remainder of the code for a method b. To contain code that is executed when the expression in an if statement is false c. To test an expression is false. d. All of the above 25. Which of the following lines of code instantiates a Boat object and assigns it to a sailboat object reference? a. Boat sailBoat; c. Boat sailBoat

=

Boat () ;

Questions 59

Checking... icp2022.txt doES NoT exist in the current directory. Please retry. >> Please Enter a file nane, followed by , txt: studentrecord. txt

studentrecord, txt

>

is

75.67

6) (5pts) Use a list comprehension to return all the numbers greater than 10 and less than or equal to 30 in the list

[23,24,28,30,35,36,40,42,44,54]

#opening the file

with open('input.csv', mode ='r') as file:

#looping through all the lines

for line in lines:

#populating the dictionary

person["firstname"] = linelist[0]

person["address3"] = linelist[5]

person["box"] = linelist[6]

price.append(float(linelist[8]))

price.append(float(linelist[9]))

print(items["firstname"],items["middlename"],items["lastname"])

print(items["address1"])

elif(items["box"] == "B"):

print("${}".format(items["prices"][1]))

ValueError: could not convert string to float: 'A' ".

Any idea how to fix this?

-

L={ww:w∈Σ

such that

L(M)=L

, and

dim(range(T))

4

defined by T(x)=Ax, where A=

4

6

6

4

2

Payment Form Credit Card (required) Credit Card Number 1234567890 CSC 1234 \begin{tabular}{ll|l|l} Expiration Date & -Month- & - Year- \\ \hline \end{tabular} Go to the code8-4.html file in your editor. Within the head section insert a link element that links the page to the code8-4_debug.css style sheet file. Save your changes. 3 Open the code8-4.html file in your browser. When the page opens, the h1 heading should slide into the page from the left and the form should drop in from the top. Neither is happening. Open the code8-4_debug.css file in your editor and study the code that applies the animation effect to the form\#payment object and the h1 element. Fix any mistakes in the code that you find. 4 Save your changes and reopen code8-4.html in your browser. Verify that the opening of the page runs the drop-in and slight-right animations. 5 When the Credit Card Number box and the CSC box receive the focus, a transition effect should appear that slowly adds a glowing brown shadow around the boxes. The glowing brown shadow appears but without a transition effect. Return to the code8-4_debug.css file in your editor. Study the code that applies a transition effect to the input\#cardBox and input\#CSC objects, and correct any mistakes you find in the code. 6 Save your changes and reopen code8-4.html in your browser. Verify that when the Credit Card Number and CSC boxes receive the focus a transition effect appears that adds the glowing brown shadow to the boxes. 7 A 3-digit number should be entered in the CSC box. If something other than a 3-digit number is entered, the box should wiggle back and forth to indicate invalid data. That is not currently happening. Return to the code8-4_debug.css file in your editor. Study the code that applies the transition effect to the input\#csc object when invalid data is entered. Correct any mistakes in the code that you find. 8 Save your changes and reopen code8-4.html in your browser. Verify that when you enter invalid data in the CSC box, the box wiggles back and forth to indicate that the data is not valid.

Questions 65

ERD of Chemical Tracking System: 3. (10 points) Using only a CREATE TABLE command (no ALTER TABLE allowed), create the SELLS table as specified below in the PEPS schema, including all specified constraints. 4. (5 points) Use a command to create a single constraint that enforces a rule for the chemical concentration attribute in the CHEMICAL table. The value for the concentration attribute must be greater than

0

red and

n

comparisons to group the jugs into pairs. (b) Give a randomized algorithm whose expected number of comparisons is

O(nlogn)

and

==

10)(5pts) Write a recursive function to count the numbers of a particular element in a list for example:

cntElem

b. Hello equals Hello

−>3

false 13. If result

=5+3

Figure 2 illustrates the navigation map from one district to another district in state of Johor, Malaysia. Remember, the following graph is a directed graph. From Figure 2, the Start State is Segamat, and the Goal State is Johor Bahru. The transition costs are next to the edges, and the heuristic estimate,

h

Write a

C

input=assessment is on a substitution cipher technique // input text wdjg //hill cipher key output=ceseikqcfx wy jw c ebelqzedikag zngkjp hqwllqmkw //cipher text

Questions 76

, , , or

/

Example output: Cannot divide by zero 4. Printing the result of a calculation Print the output of the calculation input by the user. For example, if the second command line argument is

+

Example command-line execution: java CommandLine

4−6

Example output:

2∗3=6

Questions 77

Which two statements about data VLANs on access ports are true? (Choose two) a. They can be configured as trunk ports. b. Two or more VLANs can be configured on the interface. c. 802.1Q encapsulation must be configured on the interface. d. Exactly one VLAN can be configured on the interface. 4. They can be configured as host ports. QUESTION 15 When joining a network, a node may hear from multiple access points/base stations, A node decides to associate with a particular base station or an access point that has 1. High SNR 2. High BER 3. Nice name 4. Low SNR QUESTION 16 In mobile cellular networks 4G, if a user is constantly moving (i.e., changes the visited network frequentely), what is the most suitable routing mechanism to support hisher mobility 1. let the core network (routers) handle of 2. no routing is needed, moving between networks is not permitted in

- Prepare the classes that you use for develop

- For the classes select three methods and determine how to test them.

#include <iostream>

#include <string>

int numbers[15];

string fileName = "fifteen.txt";

int i = 0;

while (getline(fileHandler, number))

}

else

{

sum = sum + numbers[i];

return 0;

}

2. In the “Load File” button open the Sales.txt file and:

a. Load the sales data into the salesArray_String[ ] from the Sales.txt file. You will create a

event:

1. Create a method named PopulateListBox that will accept as an argument a onedimensional string array. Then load the data from the string array passed as an

displayed as currency with two decimal places, example: $206,280.79.

3. Create a method named FindHighestSales that will accept as an argument a onedimensional double array. The method will determine the highest sales value from

label displayed as currency with zero decimal places, example: $109,872.

Sales.txt

210.934

198.775

247.850

252.274

249.850

Questions 81

program that will: a) read the degree of the polynomial to be fitted from the first argument on the command line (argv [1]). b) open the file data . dat and read the number of data points

n

i

from the file. c) compute and print the matrices

X,X

T

y

T

y

=(x

i

A=X

T

y

should be computed using the dgemv function. d) compute the Cholesky factorization

. e) solve the two triangular systems of equations required to compute the solution vector

b

bound for each of the following: (c)

[5pts]T(n)=2T(n/4)+

10s

\& Names, Date) - The report must include the following - All constraints and business rules identified with all assumptions clearly stated. - EER and Relational Schema. - All the tools and resources that you used. - A table which lists the tasks done by each group member.

C++

program that will: a) read the degree of the polynomial to be fitted from the first argument on the command line (argv [1]). b) open the file data . dat and read the number of data points

(x

i

)i=1,..,n

from the file. c) compute and print the matrices

X

T

Xb=X

T

=(x

The matrix product

A=X

T

y

L

. e) solve the two triangular systems of equations required to compute the solution vector

Appendices Resources: Kali Linux, Windows XP, Windows Server2003

Questions 86

For the following recurrences, use a recursion tree to guess a "good" asymptotic upper bound for

]T(n)=2T(⌊n/2⌋)+2nlogn,T(2)=4

Questions 87

. You need to use the following table to describe the execution of the algorithm and give the minimum spanning tree and its weight.. If

d[v]=∞

has been added to

S

values empty, to make the table clean (but it is not required to do so). Table 1: Prim's Algorithm for Minimum Spanning Tree The edges in the MST are Its weight is

Questions 88

initialize global first to 44 initialize global second to 77 initialize global third to 55

Questions 90

indirect routing

2.

Direct routing

Questions 92

3. This question is on Dijkstra's (Link State) algorithm for the graph shown below. The Dijkstra's algorithm that is run at node

u

to all the nodes in the network, and show the table like the above one. Use the word "infinity" to indicate that the cost to some node is currently infinite.

Questions 94

B.

11000000.00000101.00100011.00001011

14. When we adopt the CRC error detection method, which of the following is the CRC code? ( ) A. Divisor B. dividend C. Quotient D. Remainder 15. An Ethernet topology and the current forwarding table of its switch are shown in the figure below, suppose 1) that host 00-e2-24-00-d5-a1 wants to send one data frame to the host 00-e2-24-00-d5-c1, and 2) when the host

00−e2−24−00−d5−c1

and interface

{1}

C. Interfaces

{2,3}

and interface

{1}

u

) in the network after

v

) in the network after

sequence diagram and block diagram

Customer: can registers on the site and login, then books tickets and pays by bank card only, after that he can cancel, view or modify the ticket. He can also send an email regarding problems in the system.

Given the following adjacency matrix, draw a directed graph. Submit your graph.

0

1

0

0

https://dovizkurlari-l6vtviaacq-uc.a.run.app/api/doviz/eur

https://dovizkurlari-l6vtviaacq-uc.a.run.app/api/doviz/usd

Questions 98

Its for C++ please I need help and the output needs to be like in the pictures

The cpp file and all numbers file are in the same folder as follows:

The first line in each file numbersXXX.txt contains a string that can contain 1 or more spaces. The rest of the file contains a bunch of integer numbers separated by one or more spaces. You should write the code to read the file data, then calculate and display the average, the smallest, and the largest number. The code also displays the count of numbers that are larger than the average number and displays the count of numbers that are smaller than the average number.

Put all the test input files in the same place as the code that opens the file. This is the concept of "current working directory" (CWD). When you are running Visual Studio with an existing project, the current working directory is the Visual Studio project folder, and Visual Studio will only find the input file in this current folder when your code opens a file given a simple file name.

If you work on the Mac, you have to find out which folder you should place the file into because the default CWD folder may not be the same as the Visual Studio project folder.

6- The input file has to be first opened, checked for open error. Program should display an error if the file cannot be opened.

7- The first line in the file should be read with a single file read statement using getline (requires #include <string> in Visual Studio), with the first parameter being the input file variable instead of "cin". After that, use a "while" loop to read individual numbers using the >> operator, by the same way that was shown in Chapter 5 slide and lecture.

Sample console output:

Test 1

Given the same directed graph as in Question \#3, what is the ranking of the four pages according to the PageRank vector?

1,2,3,4

Questions 100

Convert a previously-written "merge" program into a subroutine. Write a "main" program to perform mergesorting of a list of integers by calling "merge" repeatedly.

---------------------------------------

NOTE: DO NOT COPY/PASTE PREVIOUSLY POSTED SOLUTIONS.

Please base your "merge" subroutine upon the following code:

.data

string_statement: .asciiz "The sorted and merged array is: "

.text

la $t3, z #New "pointer" z storing values to $t3

li $t6, 4 #Count of elements in x

lw $s1, ($t1)

lw $s2, ($t2)

j compare

check_y:

blt $s1, $s2, store_x

store_y:

j loop

store_x:

j loop

exit:

la $a0, string_statement

syscall

syscall

lw $a0, ($t3)

j printloop

actual_exit:

=1760

yards - 1 mile

C

and PYTHON required)

5. Consider the network shown below. Suppose AS3 and AS2 are running OSPF for their intra-AS routing protocol. Suppose AS1 and AS4 are running RIP for their intra -AS routing protocol. Suppose eBGP and iBGP are used for inter-AS routing protocol. Initially suppose that there is no physical link between AS2 and AS4. a) Router 1 learns about prefix

x

from which routing protocol? c) Router 3 b learns about prefix

x

router in AS1.

Questions 104

Questions 105

1. The following directed graph represent a simple website: each link from Page A to Page

A

to

changes during the random walk from

t=0

lim

1

v

4

(

) weather

gResults:

Questions 108

is in the top left, although there is no visual element here), and also contains a public variable that indicates whether the Position is an exit or not. Mazes will obey the following rules: -

(0,0)

(i.e. maze

[0][1])

(i.e. maze

[θ][θ])

to some exit. It does not have to be the best route and can double back, but it does have to be a correct sequence that can be successfully followed step by step. You do not have to worry about mazes with no escape.

Questions 110

call calcAndShowPrice *

childRate chkChild * . Checked *

[3 points] Suppose a doubly linked list queue implementation uses the following struct: As expected, the queue class has private pointers to the front of and rear of the queue: Node

⟨T⟩

class

}

2.2

T LinkedStack

<

2.3

[5 points] Assuming the correct STL libraries and the std namespace have been included, what will be the output of the following statements? stack

(

char

;c<=

'

x=

charStack.top (); charStack . pop (); char

150

n

dict_name = {'Jean': {'one', 'two'}, 'Paul': {}, 'Fred': set(), 'Val': {'one'}}

game = [set('four'), {'four', 'five'}, set(), {'two'}]

print(dict_name)

The output I'm getting is:

Important Note: - At the begining of your answer sheet, note your Postgresql version that you used for this homework. - At the answers, show your work, SQL, comments on EXPLAIN output and simple calculations i.e. (1) Define a table "numbers" with 3 attributes as below. numbers ( id integer, A integer,

B

- A values between 1-1M (high cardinality) - B values between

1−1 K

columns. Test 2: First, define a B+-tree indexes "a_idx on

A

1M

(1 million) tuples for this table.

θ

, it adds that amount to the quantity. If it is less than zero, it throws an InvalidQuantityexception (do not catch it - there's no way to solve this problem here sensibly). - A method called sell which takes a single int as a parameter and returns nothing. If the parameter value is at least

3

4

}

}

So for the first one, X = 64, Y = 10, n = 5 and the pieces/profits are

2 x 4 : profit 16

1600

(64, 10, [(2, 4, 16), (4, 2, 20), (1, 1, 1), (21, 23, 50), (12, 21, 31)])

Questions 117

In supervised learning, the computer is taught by example. It learns from past data and applies the learning to present data to predict future events. In this case, both input and desired output data provide help to the prediction of future events. Critically discuss any five (5) real-life examples of supervised learning applications

n=4

, try to study the recursion tree. (b) Identify the recurrence between the original problem and its subproblems. (c) Develop an bottom-up algorithm to solve the original problem with input

• Students may be allowed to select any topic of their choice in consultation with the teacher.

• Given below are some topics which may also be chosen by the students.

Write a report on Security in the FreeBSD UNIX operating system. Your report should include the following: user accounts and user authentication, user authorization, passwords and encryption, how is FreeBSD is more secure than operating systems such as Windows XP, security for Files and File system in FreeBSD and network security in FreeBSD such as Firewalls and intrusion detection and how they prevent attacks from network and the internet

Questions 120

as the sum of

1,4,5

=1+1+1+1+1+1

=5+1

5. [Coding] In any programming language, write a function which displays all odd numbers between two numeric values, including themselves. Consider reading the parameters from user input.

Questions 122

0

,c

k

, for some

n

Questions 123

Display the student's name from LinkedList

Check which student name is repeated more often and display its name and the number of times it has been repeated.

SQL

query to display all employees having their name starting with the letter 'J' 2. Write an SQL query to display the total amount earned by each employee

3. Write about Main memory in detail? With the help of a diagram explain the working principle of semiconductor RAM.

4.Describe the most common Auxiliary Memory Devices used in computer

SOLVE IN PYTHON

Questions 128

" turnip

=

for each number from 1 to 8 by 2 do set global answer

onion

=

5 Points) Minimax with Alpha-Beta Pruning. i. Explain the concept of procedure of Alpha-Beta Pruning. What advantages do you gain by using it? ii. Perform Alpha-Beta Pruning on the following tree. Write your answer directly on the figure below. Be sure to record the [min, max] values on a node to identify your alpha cutoff and beta cutoff. Assume the root is the Max node.

Questions 131

else

if (age < 0 || age >120){

}

Questions 132

*COMPLETED* (Background info)

Extend your program so that it

**QUESTION TO ANSWER*****

****NEED HELP ANSWERING AND CODING**** (Please show me step by step)

To get 100% of the challenge marks requires a more complex (but not necessarily optimal) strategy that doesn't waste as much carpet. For example, a 4m x 4m room could be done with 4.68m from the roll (17.1288 square meters) by using a 4m strip and two 0.34m strips rather than the simpler way that uses 8m (two 4m strips) from the roll.

Questions 133

>> Input a list of six 1s and 0s corresponding to the binary number to be converted

>> Input a list of six column weightings consisting of powers of two

>> Input a list of six column weightings consisting of powers of two

>> Create a new list that contains the decimal values of each binary digit of 1 in the input list.

For each of the first 6 digits in your PI, create an input list of 1s and 0s of length 6 as follows:

If a digit in your PI is even, append 0 to the input list, if it is odd, append 1 to the input list.

​​​​​​​Question 1:

i.Describe the type of the input and output data for this first task and describe the allowable values for each

Questions 137

Short answers. Do not just translate the terms.

v. Solve the puzzle using 3 colors. Explain the strategy step by step.

Questions 138

e) List all the data in your table production.

Questions 139

ii. Solve the puzzle.

Questions 141

normalmail

=′

i=0

j=0

emailIn.index

(

)

j=emailIn.index ('@'

emailIn

[:i]

)

domain

=

' : normalmail

+

char. lower () else: newmail

=dict()

try: fhand = open(fileName) \#opening the file and storing the control to fhal except: return "File cannot be opened: " + fileName for line in fhand: \# Displays the number of email address with a value of

Questions 144

Figure 3.15 Evaluation of search algorithms.

d

is the depth of the shallowest solution, or is

1

complete if

≥ϵ>0;

3

(In Python )This assignment will give you practical exposure with interactive programs, if/else statements, methods that return values, and while loops.

Student x is looking at developing a guessing game. The guessing game program generates a random number and allows the user to make guesses until the user gets it right. Ask user to choose range of number that want to guess (for example guessing number to be between 1 and 1000)

Please make a guess of my number. For each guess, I will tell you whether the

right answer (my number) is higher or lower than your guess.

higher

Your guess? 60

lower

Your guess? 90

You got it right in 8 guesses

Would you like to play again? (Press ‘Yes’ or ‘No’): Yes

higher

Your guess? 60

higher

Your guess? 84

higher

Your guess? 90

lower

Your guess? 93

higher

Your guess? 40

lower

Your guess? 56

Total guesses = 25

Average guesses/game = 8.33

3. Define a class constant for the maximum number (MAX_GUESS) that the user can guess.

4. Correctly implement the following static methods in addition to method main:

6. At the end of the log you should print a summary report about the series of games played by the user, these being the total number of games played (use a variable to keep track of this), the total number of guesses (Max guesses) made (use another variable to keep track of this), and the average number of guesses per game.

Develop a console-based application by implementing a Class diagram based on the concept of fundamental and advanced object-oriented features, file handling and exception handling using python Programming Language. At the end of the semester (Week 12), you are required to do a presentation during the practical classes (Actual timeslot to be announced later)

C++

code that is to be translated: While doing the assignment, please utilize the following: \#\#\#\#\#\#\#\#\#\#\#\#\#\# \# Register usage: \#\#\#\#\#\#\#\#\#\#\#\#\#\#\#\#

Questions 148

Part III Calculation and Analysis (1 question, 20 points) 1. Consider the graph shown below and use of Dijkstra's link-state routing algorithm to compute a least cost path from the source node A to all other destinations. Please show your detailed analyses and computing process. Note: You must write down your detailed analysis and computing process. NO SCORE if you ONLY provide e.g., a single number.

y

, one 16-bit output out, and one 1-bit overflow flag of. It also has a series of control inputs, which can be used to select what function the ALU performs. Specifically, you need to implement the following features: Figure 1: ALU Schematic 1. Bit-wise Logic Operations:

y;x

Xor

x<<1

(e.g.

by 1 bit

x>>1

. No overflow case occurs and of should always be 0 . (4 marks) 3. Arithmetic Operations:

x+y;x−y.x,y

can be any signed integers using 2's complement representation. The comparison result should be stored in out

[0]

. (2 marks) 6. Arithmetic Operation:

x÷y

can be any signed integers using 2's complement representation. For any overflow cases or inputs outside the domain, you should set of to 1 and out to

−1

(Code in Python)

Question 1: Find the most average legendary pokemon

df = pd.read_csv('link')

df

) 2. Describe how providing support to a workgroup is different from providing support to group work. ( 3M)

Questions 152

is represented by blocks of predefined fixed size

M

,M

,m≥1

<n

and positive for all

(modn)

, take the result and XOR with the square of the third block

m

blocks is calculated by

2

[(M

1

2

2

2- What are the consequences of the above hash function being used in a public key signature algorithm?

Questions 153

and

b

s

.

Questions 154

Branch C migration will be carried out next year.

You are hired by the company to perform the migration task.

Work out the IPv6 subnet for the company HQ and each branch from the given IPv6 address block. (Place the address allocation plan here)

Create an address assignment table for the company network that contains the address of each router interface, PCs, and Servers. (Place the address assignment table here)

2. Models are classified as strategic, tactical, or operational. What is the purpose of such classification? Give an example of each type of model. ( 3M)

Questions 156

Questions 158

ou have been provided with three lists. These lists are related to one another and therefore can be designed as tables in one database. Respectively, these include employee, dependent, and tax details. An appendix of these lists is provided in the appendix at the end of this assignment. You may import them as csv into a database and then modify the tables according to instructions.

Questions 159

At phase 2, develop web-side services using the JAVA programming languages. For each task required in phase one, you should provide a website service using JAVA and provide the required security for your services to grant access only to authorized users. Here are some details regarding the functionality of some services: - View all groups and their members: this service should retrieve groups and their members along with stored rules on the server-side that exists in a file (JSON format). - Add a group/member: this service should add a group/member to a file; stored as JSON. If the group/member with the same specifications has been previously added, an error message should be displayed and the new group/member should not be stored. - Delete a group/member: this service should update the various associated file(s). - Modify a group data: this service should update the corresponding files with the new information received from client side which could be the members of the group or group access rights. - Search for security rules: this service should enable the system administrator to search for search for security rules by resources, access rules, groups, and members.. - View all security rules: this service should retrieve stored rules on the server-side that exists in a file (JSON format). Hint: Use the appropriate presentation format to save and read the necessary attributes to and from file. Page 1 of 2 Instructions: 1. Submit two files a. one zip file containing all the project's folders, assuming that you are using NetBeans to develop your TMA, then you are required to send the whole project folder as a single zip file. b. Put in a word file 1.codes of client side, the operations of the web services as well as screenshots after running each service. 2.needed xml files.

{

System.out.print(’o’);

System.out.println('r'); a. true b. false 19. A constructor access mutators are get () and

set()

Look at this sequence diagram. What is the order of the methods' calls?

a)

5- message_t()

b)

5- message_t()

c)

5- message_w()

d)

5- message_t()

Questions 163

"""

AVL Tree Node class. Inherits from BSTNode

"""

# call __init__() from parent class

def __str__(self) -> str:

"""

"""

AVL Tree class. Inherits from BST

"""

# call __init__() from parent class

"""

values = []

Perform pre-order traversal of the tree. Return False if there

are any problems with attributes of any of the nodes in the tree.

node = stack.pop()

if node:

return False

if node.parent:

check_node = node.parent.right

if check_node != node:

return False

stack.push(node.right)

"""

This method adds a new value to the tree while maintaining its AVL property., duplicate values not allowed.

Removes value from AVL tree, Returns True if value is removed, False otherwise, 0(N) runtime complexity.

"""

TODO: Write your implementation

"""

# Change these methods in any way #

def _balance_factor(self, node: AVLNode) -> int:

def _get_height(self, node: AVLNode) -> int:

"""

"""

TODO: Write your implementation

TODO: Write your implementation

"""

"""

pass

pass

# ------------------- BASIC TESTING -----------------------------------------

(1, 2, 3), # RR

(3, 2, 1), # LL

tree = AVL(case)

print(tree)

(10, 20, 30, 50, 40), # RR, RL

(30, 20, 10, 5, 1), # LL, LL

(range(0, 34, 3)),

(range(10, -10, -2)),

tree = AVL(case)

print('INPUT :', case)

case = list(set(random.randrange(1, 20000) for _ in range(900)))

tree = AVL()

print('add() stress test finished')

print("\nPDF - method remove() example 1")

((1, 2, 3), 3), # no AVL rotation

((50, 40, 60, 30, 70, 20, 80, 45), 0),

for case, del_value in test_cases:

tree = AVL(case)

print("-------------------------------")

test_cases = (

)

for case, del_value in test_cases:

print("\nPDF - method remove() example 3")

print("-------------------------------")

tree.remove(del_value)

print('RESULT :', tree)

for _ in case[:-2]:

root_value = tree.get_root().value

print("-------------------------------")

for _ in range(100):

if not tree.is_valid_avl():

raise Exception("PROBLEM WITH REMOVE OPERATION")

print(tree.contains(15))

print(tree.contains(-10))

print(tree.contains(0))

print("\nPDF - method inorder_traversal() example 1")

print("---------------------------------")

tree = AVL([8, 10, -4, 5, -1])

print(tree)

print("Minimum value is:", tree.find_min())

print("Minimum value is:", tree.find_min())

print("\nPDF - method find_max() example 1")

print("\nPDF - method find_max() example 2")

print("---------------------------------")

print("---------------------------------")

tree = AVL([10, 20, 5, 15, 17, 7, 12])

print("Tree is empty:", tree.is_empty())

print("\nPDF - method make_empty() example 1")

print("Tree after make_empty(): ", tree)

print("\nPDF - method make_empty() example 2")

print("Tree after make_empty(): ", tree)

-----------------------------------------------------------------------------------------------------

Supported methods are: enqueue, dequeue, is_empty

DO NOT CHANGE THIS CLASS

self._data = []

def enqueue(self, value: object) -> None:

return self._data.pop(0)

def is_empty(self) -> bool:

data_str = [str(item) for item in self._data]

return "QUEUE { " + ", ".join(data_str) + " }"

"""

def __init__(self):

self._data.append(value)

def pop(self):

return self._data[-1]

def is_empty(self) -> bool:

data_str = [str(item) for item in self._data]

return "STACK: { " + ", ".join(data_str) + " }"

Questions 165

WRITE A PROGRAM IN C

Output:

MaxHeap:

Questions 166

1. Determine whether the pair of graphs is isomorphic and justify your conclusion. Note: justification in case the graphs are not isomorphic should identify the invariant that is not preserved (e.g., number of edges, degrees of vertices, etc.). In case the graphs are isomorphic, identify an isomorphism and give the mapping of vertices from one form to other. (10 pts)

S

such that

S

. Consider the following Integer Program:

x

s

s:e∈s

has at most 3 terms for each

e∈U

such that

x

U

with the smallest possible number of sets in

Questions 169

Experiment 1 linked list operation

2. Essential basic knowledge

a.Linked list is a kind of non continuous and non sequential storage structure on the physical storage structure. The logical order of data elements is realized by the reference link order in the linked list.

The combination of the above is a variety of linked list structures, but the most commonly used are the following three types:

Headless unidirectional acyclic list

Or use your own familiar method to realize the insertion and deletion of the linked list.

4. Program code

#include <stdio.h>

struct llist /* Linked list structure declaration */

typedef struct llist node; /* type redefinition */

typedef node *llink; /* Redefine pointer type */

ptr = head->next; /* point to the real start */

while ( ptr != NULL ) /* linked list traversal loop */

printf("\n"); /* Newline */

}

llink ptr,ptr1;

int i;

ptr = head; /* point ptr to the beginning of the linked list */

for ( i = 0; i < len; i++ ) /* build other node loops */

ptr1->num = array[i]; /* Create node content */

ptr1->next = NULL; /* Set the initial value of the pointer */

}

/*―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――*/

if ( !mnew )

return NULL;

ptr->next = mnew; /* node ptr points to new node */

return head;

llink previous;

previous = head;

return head;

}

int A[10]={1,2,3,4,5,6,7,8,9,10};

llink p, head;

{

printf("Please enter the operation type: (1-insert, 2-delete, 0-exit)\n");

scanf("%d",&i);

}

break;

case 1:

insertnode(head,head,value);

break;

deletenode(head, head->next);

break;

printf("The last linked list: ");

printllist(head);

5. Operation results

For example:

Select Insert, please enter insert value: 2

Last linked list: [2][1][2][3][4][5][6][7][8][9][10]

6. Experimental summary

What problems are encountered in the experiment and how to solve them?

Questions 172

JAVA PROGRAMMING PROJECT

Questions 174

write a program in c, using strings that inputs 10 names and outputs the names that end with the letter 'an'

Questions 177

CODING LANGUAGE: (BlueJ: Java) PROGRAM: Flags

WRITE METHODS TO DRAW.... (in code, when viewed should look like the left top corner image //seen below// )

1)The flag of Belgium

Solve the Knapsack problem by Dynamic Programming. Knapsack of capacity W=4

item weight value

Questions 179

\begin{tabular}{l|l} 6 & Visualize Child Mortality as a function of GDP per Capita for the following South East Asia countries. Use Population as an \end{tabular} additional argument. Do not forget to label the axes and to add a title. Code and Output

10pm

on January 2, 2010. Assign the data to temp1. Print tempo and temp1. Code and Output

- The exact colours of the flags may be difficult to match; it is fine to use the standard colours: red, green, blue, orange, etc. (see the Java Documentation on Color to find out what standard colors are available), but you can use more accurate colours if you wish.

- You may not use the UI.drawImage method!

- also half white/red but on the opposite sides.

The flag is 2/3 as high as it is wide (ratio 2:3)

import sys

sys.setrecursionlimit(1000)

return numbofGroups(n, m - 1) + numbofGroups(n - m, m)

Questions 183

–Find the fitted linear regression equation

Questions 185

Median does not work in this code. Can you help fix it? C++

#include #include #include #include using namespace std; int main() { vector v; // vector declaration int n,i=0; // variable declaration double sum; // variable declaration cout << "Enter numbers(0 to stop inputting):"<>n; // Input the number while(n!=0){ // If the number is not 0 v.push_back(n); // Insert the elements into the stack. cin>>n; // Accept the number } for (const int& i : v) { // Loop to calculate the sum sum = accumulate(v.begin(),v.end(),0); // calculate the sum } double average = sum/v.size(); // Find the average of the vector cout<<"Average : "<()); // It sort the elements in descendin gorder cout << "Descending : "; for (auto i : v) // Print the values in the descending order cout << i << " "; // print the vector elements cout<

Questions 189

Construct a Left Regular CFG that accepts an expression in a dialect of LISP. This LISP dialect uses the following operators:

. The arguments of these operators could be an INT, DBL and ID where INT is a token indicating integer literal, DBL is a token indicating a real number, and ID indicating a token for an identifier. + operator accepts two or more parameters, e.g., (+

145x)

x

operators accept exactly two operators, e.g., (/ 42 ). Show your CFG in BNF indicating all necessary components. [15pts]

Questions 190

How your-custom application, as a pod, can access similar informations?

Questions 193

Answer the following questions using the banker's algorithm:

(1+2+5+5=13)

arrives for additional resources of

(0,5,2)

a. How many total resources are there of type

(A,B,C)

, can the Banker's algorithm grant the request? Justify your answer. 2. What are the differences between deadlock and starvation? 2

Questions 196

D. Multicast messages map lower layer addresses to upper layer addresses.

E. Multicast transmission can be used by routers to exchange routing information.

b. How many bits would it take to represent a page address from problem a?

c. How many bits would it take to represent the offset from the page address from problem a?

identify which category of risk cyber security falls under providing an explanation for your answer.

Questions 199

and a sequence of integers from the user. You will count and display how many integers in the sequence gives a remainder

y

Array1 = np.array( [[False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, True, True, True, True, True, False], [False, False, False, False, True, True, True, True, True, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False], [False, False, False, False, False, False, False, False, False, False]]) axis_0_edge_before

=7

axis_1_edge_after

=9

, or 35 bicycles with probabilities of

0.2,0.4,0.3

A network design engineer has been asked to design the IP addressing scheme for a customer network. The network will use IP addresses from the 192.168.30.0/24 network. The engineer allocates 254 IP addresses for the hosts on the network but excludes 192.168.30.0/24 and 192.168.30.255/24 IP addresses. Why must the engineer exclude these two IP addresses?

A 192.168.30.0/24 is the network IP address and 192.168.30.255/24 is the IP broadcast address.

(30 points) Consider the following decision tree. Figure 1: Decision tree for Question 1 a. (5 points) How many decision strategies are possible in the foregoing decision tree? b. (25 points) Solve the decision tree for minimization problem. Which option will you select?

Questions 204

radius from the franchise, however those located in a rural area do not.

Questions 206

A DHCP server is used to assign IP addresses dynamically to the hosts on a network. The address pool is configured with 192.168.10.0/24. There are 2 printers on this network that need to use reserved static IP addresses from the pool. How many IP addresses in the pool are left to be assigned to other hosts?

A 253

Question (90 points) Write a Python program that stores information about mobile phone devices in a dictionary. Then it perform some search tasks as shown in the sample run below. Your program needs to have the following functions: add_phones: its role is to interact with the user to read the phone information, create a dictionary and returns it. Each line of information is entered as shown below. It consists of serial number (to be used as key). brand, model, color, and memory. They are separated by commas. main: The role of the main function is display the menu and interacts with the user until he enters 'quit, then the program will terminate. In addition to the above functions, your solution must contain as many functions as needed. You need to divide the question into small tasks and each task handled by a function. Your code must behave as shown in the program sample runs described below.

Questions 209

$20

Duration: 7 days. 1. Enter Customer 2. Create a Rental 3. Create a Rental (custom duration) 4. Display all Rentals 0 . Exit

numpy.load. Be sure to familiarize yourself with this function.

•MATLAB users: Download the file voting_data_train_test.mat from Canvas and load it using the

•Y_train is a vector of size 300 and contains the party affiliation/label of each politician (+1 or -1).

•X_test is a 135 ×16 matrix while Y_test is a vector of size 135. These are akin to their _train

1. Let 𝑁 = 16 be the number of features (columns of 𝑋train) that we wish to consider in our classifier

model and train a linear function

repeat steps 1 and 2 above and report the training and test MSEs of your classifiers. Provide a table

reporting these values for each choice of 𝑁. (Note that here we are simply using the first 𝑁 columns of

Questions 212

You are now required to find a PowerPoint presentation on global warming. The presentation must:

QUESTION 2 (20 Marks) Google Assistant is Google's voice assistant. When it launched, Google Assistant was an extension of Google Now, designed to be personal while expanding on Google's existing "OK Google" voice controls. Elaborate on any four (4) pros and four cons of Google Assistant and state whether Google Assistant is overall an effective application or not. Justify your answer.

Questions 214

QUESTION 4 Big data analytics examines large amounts of data to uncover hidden patterns, correlations and other insights. With today’s technology, it’s possible to analyse your data and get answers from it almost immediately – an effort that’s slower and less efficient with more traditional business intelligence solutions. 4.1 Elaborate on the importance of Big Data Analytics. (10 marks) 4.2 Discuss any five (5) reasons why a company in any industry will require a software or product for data analytics.

Questions 217

Detecting fraud in a dynamic global corporate environment with an overwhelming quantity of traffic and data to monitor can be difficult. Banks are finding that artificial intelligence (AI) for fraud detection is fast, effective and efficient. Critically discuss any two (2) benefits and two (2) challenges of using Al in fraud detection.|

Questions 220

0

dz

where

=ρ(S,T,p)−ρ(35,0,p)

(or 000 dbar). 1. Compute

h

along

32.5

geo

Questions 222

A multiple-choice examination consists of 5 questions. Each question has four choices, labeled A, B, C, D. All data for that xam is stored in a file xam.txt. the exam.txt consist of at least 20 question which randomly should picked for the exam.

Java

Python

A student’s final score is calculated by adding up the points awarded for all the questions. Points for a question are awarded as follows:

• Correct answer 20 points

There can be an unlimited number of candidates.

Questions 223

QUESTION 6 [20 Marks] Detecting fraud in a dynamic global corporate environment with an overwhelming quantity of traffic and data to monitor can be difficult. Banks are finding that artificial intelligence (AI) for fraud detection is fast, effective and efficient. Critically discuss any two (2) benefits and two (2) challenges of using AI in fraud detection.

Questions 225

0

dz

where

=ρ(S,T,p)−ρ(35,0,p)

(or 000 dbar). 1. Compute

h

along

32.5

geo

I need 5 input

Questions 227

A Hub routing sends all packets to all connected devices. Switch routing is only used to route traffic between switches.

B Hub routing sends all packets to all connected devices. Switch routing sends packets to specific devices.

=−

∫ρ

=ρ−ρ

1000 m=1000dbar

), and the level of no motion is set to

at the surface. 2. Plot the vertical section of

h

N

in the Pacific Ocean. 3. Compute the meridional component of geostrophic current

. [ ] whos

Questions 230

to stop your data entry. 12 5 33 66

−1

write VHDL CODE using multiplexer for :

A>B

card suit - '中'

Hearts - '

'œ'

type int: number of players - takes a parameter

N→

cards

8

is the

=1/(i+j−1)

0. Wirite a Demo class that implements the interface Number Creste an array of size n. Find the factors of numbers from 1 to

n

3=a∣2∣]=1,3

4=a[3∣]=1,2,4

=3

Relatively prime

Questions 236

In this assessment, you will write a program to play the game ‘Need for Java’. The objective of the game is for the player (human) to control a car on a highway. The player must dodge obstacles on the highway and outrun the authorities that are pursuing them. The player begins the game on a random lane on a three-lane highway. With each turn, the player has to make a choice between a few alternatives in order to attempt to escape the authorities. While traversing the highway, the player will encounter obstacles, some of which offer benefits and others that should be avoided. The vehicle the player starts with has certain characteristics such as boost speed, max fuel, and damage sustainability. These characteristics determine the success or failure of the pursuit. The pursuing authorities will attempt to stop the player at any cost. The game ends when the player sustains damage greater than the maximum sustainable to their vehicle, runs out of fuel, or manages to get to the end of the highway.

The game begins by requesting the player enter their name. This name cannot be blank and can only be between 3 and 12 characters (inclusive) in length. If these requirements are not met, the player should be asked to re-enter their name until the requirement has been met.

The player selects from a difficulty level, with the corresponding specifications for each level as follows:

Moderate

Highway length: randomly selected between 15 and 30

Max fuel for vehicle of choice: 50%

Number of obstacles across three lanes of highway: 45

The player begins the game randomly placed on any lane of the highway in the first section. The player can be represented using the character ‘@’

The player is given the following options they can perform:

Swerve down

This option allows the player to move forward one section on the highway. However, this move allows the player to change to the lane below their current lane. This move is only applicable if the player is not in the lowest lane on the highway. This move costs 2 fuel points.

Provides the player with 10 fuel points

The probability of occurring is 30%

Represented in the game as a ‘B'

Tyre Spikes

Cause 60 damage to the player’s vehicle

The Probability of occurring is 10%

Questions 237

Consider the following protocol based on symmetric key encryption, designed to let Alice and Bob decide on a fresh, shared session key K,. We assume that RA, RB are nonces selected by Alice and Bob. IDA and ID are the identities of Alice and Bob. KAD is the long-term shared key between Alice and KDC. Kap is the long-term shared key between Bob and KDC. (1) Alice →→→ KDC: IDA. IDB.RA (2) KDC → Alice: EK (RA-K., IDE, EK K₂, IDA)) (3) Alice → Bob: Ek (K, IDA) (4) Bob A: EK. (RB) (5) Alice Bob: Ek. (RB+1) What is the benefit of using R4? Which phase of the protocol implements mutual authentication?

Both the Player and the Bank initially gets two cards each. The values of the Player's pair of cards and the Bank's pair of cards need to be summed up. The values of each card in a deck are as follows:

The Ace card has value one.

If the Player's hand totals zero to five, then the Player must draw a third card. A new updated sum with the third card is then calculated.

If the Player's hand totals six or seven, then the Player stands (i.e., does not draw a third card)..

Write a program called AlteredPuntoBanco that will simulate the running of multiple games of Punto Banco and prints out statistics based on the results of the games. The following is a general outline of what the program needs to do:

Play a game of Punto Banco

Determine the winner of the game or if a tie occurred.

Ask the user if they want to play again, if so, then play Punto Banco again.

Assume an unlimited deck of cards – In the real Punto Banco game multiple sets of card decks are used. For this exercise, we will just generate random numbers (cards) and not worry about how times the Ace of Spades has been dealt. Just assume that we have an unlimited number card decks to use.

Sample run 1

Enter a seed: 1005

Player draws first card: 3

Bank draws third card: 5

Bank total: 6

Ties: 0 of 1 game (0.0%)

In the sample run above, the seed entered by the user is 1005.

Sample run 2

Input:

Player draws first card: Jack

Player draws second card: King

Bank draws third card: Ace

Bank total: 1

Ties: 0 of 1 game (0.0%)

It should be noted in this sample run that the sum of the Player's first two cards and the Bank's first two cards are both zero. This is because any card above nine has a value of zero. Hence, all four cards, 11 (a Jack), 13 (a King), 12 (a Queen), and 10 all have a value of zero each.

Run:

Enter a seed: 1049

Would you like to play again (Y/N)? n

Player wins: 1 of 1 game (100.0%)

input:

2637

Player draws second card: King

Player draws third card: 3

Bank total: 3

Result of game: tie

This sample run is an example of a tie.

Sample run 5

n

Run:

Player total: 8

Result of game: player wins

Player total: 7

Bank draws first card: King

Would you like to play again (Y/N)? y

Player draws first card: 3

Bank draws second card: 4

Bank draws third card: 2

Bank wins: 1 of 3 games (33.3%)

Ties: 0 of 3 games (0.0%)

Please refer to program description. dont write existing chegg program.

Questions 239

There is an initial viewer location at (0, 0, 5) and user can type ‘x’, ‘X’, ‘y’ and ‘Y’ to change the viewer location.

If you have Cygwin/Xfree86 environment with OpenGL setup on your computer, you can compile and execute the program using the command lines below:

// diamond.cpp

#include <stdlib.h>

GLfloat vertices[][3] = {{-0.5,0.0,0.0},{0.0,0.0,0.5},{0.5,0.0,0.0},

{0.0,0.0,-0.5},{0.0,0.5,0.0},{0.0,-0.5,0.0}};

// draw a triangle via list of vertices

void triangle(int a, int b, int c) {}

// idle callback, spin diamond 2 degrees about selected axis

void spinDiamond() {}

// reshape callback

void myReshape(int w, int h) {}

glutInitDisplayMode(GLUT_DOUBLE | GLUT_RGB | GLUT_DEPTH);

glutInitWindowSize(500, 500);

glutMouseFunc(mouse);

glutKeyboardFunc(keys);

}

Questions 240

num

>0){

num = divide(num, b); \}

//

Q2. A router received a broadcast request, to whom it will forward it? Hosts in the same VLAN and IP-network Hosts in the same VLAN Hosts in the same IP-network Moving to another question will save this response. All the hosts None (i.e. the router will not forward the packet)

Questions 242

c++ -o project2 project2.cpp <enter>

./ project2 nc ni m <enter>

#include <iostream>

#include <cstdlib>

bNode<T> *left; // pointer to left child

bNode<T> *right; // pointer to right child

template <class T> class bTree{ // binary tree class

bNode<T> *root; // root pointer

public:

bTree(){root=NULL;} // constructor

};

// destroy a subtree, to be implemented

destroy_tree(node->right); //move to right subtree

delete node; //delete

if(key < node->value){

//if the key is less than node->value move to the left subtree

//if empty, create a new node for node->left and assign the key to it

node->left = new Node<T>;

}else if(key >= node->value){

//if the key is greater than equal to node->value move to the right subtree

//if empty, create a new node for node->right and assign key to it

node->right = new Node<T>;

template <class T> bNode<T>* bTree<T>::search(T v, bNode<T> *t){

}

if(!root)

root=new bNode<T>(v);

if(root){

cout<<"Tree elements:"<<endl;

else

cout<<"Tree is empty."<<endl;

int ni=atoi(argv[2]);

int m=atoi(argv[3]);

while(i<nc){

char c=rand()%26+65; // uppercase letter

cout<<endl;

}

i=0;

while(i<ni){

if(i%m==0)

cout<<endl;

}

Questions 244

'column name of

x

value', style

=

Write a Pep/9 assembly language program that corresponds to the following C program:

int num1;

return 0;

}

Use our imagination and create our own LCD displav animation. Your grade will be based on

the originality/uniqueness of your LCD animation

, your answer should be in 15 significant figures. (4)

Questions 249

, your output should be in two decimal digits

Questions 253

a. You should design an aquarium in the shape of a cuboid, the length of the sides of the base

h

. The volume of the aquarium should be

h

so that the area of the lateral surface plus the base is as small as possible. b. In the spatown, at the end of the season, nomore than 12 trainsper day can be sent. These are express and fast trains, where all seats are numbered. Each express train consists of two 80-passenger carriages and 4 48-passenger carriages, and each fast train consists of 5 80-passenger carriages and two 48-passenger carriages. A station can send a maximum of 42 80-passenger carriages per day and a maximum of 4048 passenger carriages perday. How many and which trains should be sent per day to maximize the number of passengers? How many passengers can you Garry?

Part 2: Design Analysis and Risks Complete the following: Write an analysis of your physical design, providing appropriate rationale for the chosen topology, hardware choices, network segmentation, and device placement. Describe two significant business or IT risks involved in deploying your advanced WAN Cisco-based infrastructure design. Briefly describe strategies for mitigating them.

Questions 256

True

False

Questions 258

Create a view called Booking_View that will display the number of passengers the bus can transport, the customer ID, customer address and the location province. In your query, only display the results for a booking from the 20 June 2017 to 25 June 2017. Sample Results Mark Allocation

False

QUESTION 38

d. All of the above are correct

Questions 260

{

public:

// Intentional empty.

}

};

// A class for a BST which may include many Nodes.

void add(int item);

void inOrder( ) const;

};

// Constructor

}

// Insert a new node under the subtree using recursion

{

if(subTree->left == nullptr)

{

insert(newNode, subTree->left);

if(subTree->right == nullptr)

{

insert(newNode, subTree->right);

}

void BST::add(int item)

{

}

else

void BST::inOrder(Node* subTree) const

{

inOrder(subTree->right);

}

void BST::inOrder( ) const

{

7

add 15

height

postOrder

binary search tree like below:

Questions 261

−(b)

2

2

81−49

=b81−b

4c=b

b=7

matrix. Now,the main requirement is that I must be found back the original values of the matrixfrom the given result of the matrix. It meansthat LHS

=RHS

and

B=7

from 32 means youhave to apply formula on 32 and get back the original values, result but due tothe square in the formula, values have been increased from 255 that's why this formulais not working properly. ONE IMPORTANT point isthat we have information of one value whether it's

A=9

A sample set for a two-class (Positive-P and Negative-N) classification problem, with features

×1

BOOKING (1) The Independent Institute of Education (Pty) Ltd 2018

16;17;18

discount, if the location price is greater than or equal to

R500

1.3. Use the surf command to create a plot of the function

r=1+sin(t)

-axis (x), yaxis (y) and zaxis (z).

Questions 265

is defined over the alphabet

{ab}

f(x)=

2

),−π<x<1

e

−0.1

f(x)

for FIVE values of

x

1

=2.3,x

3

4

=−5.5

-90 to 90 with steps of 20 and the third axis from 1990 to 1999.99 with steps of 1/12: /X, Y,2]=meshgrid(0:20:360,-90:20:90, 1990:1/12:1999.99); Then we generate data, data=sin(X/1000). *cos(Y/100). *tanh(Z/2000);

What is the size of the matrix data? What is the minimum, maximum, and mean value? In what position is the maximum value?

(R1−4)

for a symbolic registers (variables) occurring as follows:

x,y

, and

2x+2y+z=10

and

y

have values from

(h

, 'color', '

Questions 270

1. The following code displays a screen with an application icon, a textbox to enter a name, a label to display information, and two buttons to call functions. You need to make the following changes to the code.

#Add two functions here to great the user and close the window #This will create a screen

window = Tk()

image = Image.open('profile1.png')

pixels_x, pixels_y = 100,100 #size of the image

lbl_var=StringVar()

lbl = Label(window, textvariable=lbl_var, fg='Blue', font=("Arial", 12)) lbl.place(x=140, y=5)

#close button

btn_close = Button(window, text="Close", fg='blue', command=closeWindow) btn_close.place(x=210, y=80)

SELECT h.housing_sn, h.town, h.interested_buyer

FROM transact t JOIN housing_list h

a)bab

x

bab

2D

feature space for three classes. - For class w1, the training samples are

{[6;5],[7;4],[7;5],[8;5],[8;6],[9;6]}

, where the notation is as follows:

]

Your task is to classify a test sample

K

-nearest neighbor classification, where

K

-nearest neighbor classification, where

p(x∣

wi

C1=[

2

1

C2=[

2

]

x

using the Bayesian classifier if the prior probabilities are equal.

)

10

1.

Home network

4.

high coverage of base stations

#include <iostream>

using namespace std;

product *= N;

N--;

cout << Product(10);

return 0;

[03+06]

a) Check whether the functions

1

d

3

2

d

dx

dy

(0)=1.

3- Role of Machine Learning

===========================================

Project Objectives

Early Recognition / Early Detection of the epidemic

QUESTION 38

Select the correct statement(s) regarding TCP and UDP transport layer protocols.

Questions 280

The blue paint procedure must be applied to determine whether or not the following FA accepts any words. Which one of the following represents the correct final step in the procedure with the correct conclusion? et.myexams.unisa.ac.za/portal/site/COS2601-22-EX01/tool/4781b5c0-5eef-445a-be77-295d Wholesale...

3

Exercise

970×61

Debugger Statistics ORIG

In stores, boxes should be placed in an organized way otherwise it will be messy. Given a collection of boxes, it is requested to place them on top of each other to reach the minimum possible height. There is a condition, where a box cannot be placed on top of another box unless the area of its

2D

(2,1,3),Box2:(6,3,8)Box3:(4,2,5)

, Box 4:(3,1,6), Output: From bottom to top as follows: In the bottom

Box 3 on the base

(6,3)

and height 1 , Finally

6×8

and height 3 , then box3 with base

Questions 283

java

BWI Baltimore/Washington International Thurgood Marshall

airports-data-2

same as airport data 2

airports-data-4

The program should ask the user for a search term to use to search for a specific airport. After getting the term from the user, which may contain multiple tokens, the program should read the data in airports-code.csv to determine if an airport associated with the search term can be found. If an airport is found, the program should display an annual report (i.e., statistical data is grouped by year). To do this, the program should read airports-data.csv to find all the relevant lines containing data for the particular airport.

File content

Each line in airports-data.csv represents data for an airport associated with a month of a year. The information that is separated by commas represent the following data items.

Airport code

The total on time flights for that month

The following is the second line of airports-data.csv.

Additional details

Reading the data in a CSV file – Use the typical approach to reading data from a text file (i.e., read one line at a time). Since the data is separated by commas, how can you extract each piece of data individually? Consider using the split method that can be called on on a String object (see example below).

int num = Integer.parseInt(str);

Search for the airport – You should search both the airport code and name values in airports-code.csv for the search term that the user enters. The search should be case in-sensitive. You may assume that a search term will only result in finding a single airport or no airport at all. So, a search term like international, which appears in the names of more than one airport, is not used in test cases for this assignment. The sample runs below show both the airport code and name in the report output, hence you will need both of these values. If you place the code to search for the airport in a separate method, you will need to return both the airport code and name that was found. This would be two strings. How can you return two strings from a method?

Formatting – In the table, all numbers except for the year are allocated 14 spaces. The percentage values have a single digit after the decimal point.

Sample run 1

Windows 10

You plan to deploy Microsoft 365 Apps to devices on your network by using Microsoft Intune.

*Windows 10

*Android, iOS, and Windows

Q1- Create two integer variables age and year and assign value 15 and 14 respectively.

Q2- Use System.out.print to display a Boolean value of comparing age less than year.

OPERATING SYSTEMS

Consider a swapping system in which memory consists of the following hole sizes in memory order: 10 MB, 4 MB, 20 MB, 18 MB, 7 MB, 9 MB, 12 MB, and 15 MB. Which hole is

for first fit? Now repeat the question for best fit, worst fit, and next fit.

PLEASE SHOW ALL THE STEPS SO I CAN UNDERSTAND, DON'T JUST POST THE ANSWER. EXPLAIN WHY IS IT THE BEST/WORST/NEXT FIT SO I CAN UNDERSTAND.

Questions 289

URGENT Implement a logic agent with a rule-based system, discuss the rules in your rule base system, and compare the benefits of logical operators in your rule-based system with the previous implementations.

Use the online https://www.onlinegdb.com/IDE and change the language to Java.

part1

Q1-Create a Boolean variable isHaed and assign the value true.

Q2- Use one way if statement to check if isHead equal true, then display "Let's go to the game", otherwise

ARTIFICIAL INTELLIGENCE, PYTHON

Source:

1

) and

r

2

Questions 293

Use the online https://www.onlinegdb.com/IDE and change the language to Java.

Consider a seven-node, open single-server Jackson network, where only nodes 2 and 4 get input from the outside (at rate

5/min

3

1

0

3

1

4

0

0

0

0

1

6

1

3

0

1

0

0

1

6

1

0

1

0

0

6

1

.

( 2 pts) -

(−55)×(−35)

(3 pts) -

85/27

Source:

https://www.chegg.com/homework-help/questions-and-answers/enhance-previous-homework-first-order-logic-compare-success-new-operators-implementation-a-q105056780

2:

To add a new phone device enter: serial, brand, model, color, memory: **User Menu** 1 - Print all phones data in a tabular format 2 - Print phones information based on the phone serial number 3 - Print phones information based on brand Enter your choice or "quit" to exit : Wrong input **User Menu** 1 - Print all phones data in a tabular format 2 - Print phones information based on the phone serial number 3 - Print phones information based on brand Enter your choice or "quit" to exit : quit

(0,0)

, the equations of motion read

2

)=−

(x

3/2

GmM

)

,v

y

The owner of a photocopy store applies 5 cents charges per photo copy. There is an extra setup fee for each photocopying job which is about

2.5$

If it costs the owner 3 cents per copy, write a Python program that reads a text file which contains the sales of each day during a period of time then determines the total revenue, cost and profit over this period of time. (Profit = revenue-cost). Instructions: - You should include your code (Typed) in addition to a screenshot of the file which has the numbers and for the output. - The number of records should be at least 10 ;

Questions 300

and

50 h

\begin{tabular}{|l|l|l|l|l|} \hline \multicolumn{1}{|c|}{ PLAYER } \\ \hline PID & \multicolumn{1}{c|}{ Name } & Age & Nationality & \multicolumn{1}{c|}{ Height } \\ \hline 001 & Lauren & 23 & Germany & 183 \\ \hline 002 & Steve & 25 & U.K. & 174 \\ \hline 003 & Joe & 28 & Canada & 191 \\ \hline 004 & Han & 29 & China & 178 \\ \hline 005 & Yannis & 33 & Italy & 181 \\ \hline 006 & Harris & 30 & U.K. & 168 \\ \hline 007 & Viper & 25 & China & 174 \\ \hline 008 & Jason & 27 & U.K. & 181 \\ \hline 009 & Marcus & 36 & U.K. & 185 \\ \hline 010 & Kehl & 29 & Germany & 174 \\ \hline 011 & Jacob & 21 & Canada & 190 \\ \hline 012 & Nick & 27 & Canada & 177 \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline \multicolumn{3}{|c|}{ CLUB } \\ \hline \multicolumn{1}{|c|}{ CID } & \multicolumn{1}{|c|}{ ClubName } & \multicolumn{1}{c|}{ City } \\ \hline 101 & DragonSlaver & Chicago \\ \hline 102 & Hunter & Miami \\ \hline 103 & Revenge & Chicago \\ \hline \end{tabular} \begin{tabular}{|l|l|l|} \hline \multicolumn{3}{|c|}{ YEAR } \\ \hline \multicolumn{1}{|c|}{ PID } & \multicolumn{1}{c}{ CID } \\ \hline 001 & 101 & 5 \\ \hline 002 & 102 & 4 \\ \hline 003 & 103 & 5 \\ \hline 004 & 103 & 2 \\ \hline 005 & 101 & 3 \\ \hline 006 & 102 & 3 \\ \hline 007 & 101 & 4 \\ \hline 008 & 103 & 7 \\ \hline 009 & 102 & 1 \\ \hline 010 & 101 & 2 \\ \hline 011 & 102 & 1 \\ \hline 012 & 102 & 4 \\ \hline \end{tabular} (1) Identify primary keys and foreign keys (if any) for each table. (4 marks) (2) Draw the RM diagram of this database. (5 marks) (3) Briefly explain the conception of "Entity Integrity" and "Referential Integrity". Does the database table satisfy these two types of integrities? (6 marks) (4) Write SQL statements for the following queries: a) Find out all players from the U.K., and show the output fields of PID, Name, and Nationality. (5 marks) b) Find out the average age of all players and show the output field of AverageAge. (5 marks) c) Find out the players who are older than or equal to 25 and taller than

175 cm

and

arr[1]

is 2 explain why the value of

x

in line 22 . If any of these values were changed by methods

m2()

You are asked to do some research, and write a report that answers the following questions in a report structure, using your own words: 1. What is Cyber Security? Define, and talk about any of the necessary programming tools used in this field to make strategic plans and improve business. Report Writing: You should follow the following guidelines while writing your report: Your report should be at least 250 words in length. Ensure that your report has an appropriate structure and writing style. Your report should include at least one figure/table. You should include the references (at least two).

Questions 304

,a

2

,…

be the sequence of integers defined by

2

i−1

Prove by strong induction that

2

for all integers

SQL

statements to count the number of customers from the CUSTOMER table. (5 marks) (4) Write the SQL statements to count the calls that last for more than 10 minutes from the CALL table. (5 marks) (5) Draw the table to show the results of the following query. (5 marks) SELECT COUNTRY. CountryNameEng, COUNT(CITY. CityID) AS Citycount FROM CITY INNER JOIN COUNTRY ON CITY.CountryID = COUNTRY. CountryID GROUP BY COUNTRY. CountryID, COUNTRY . CountryNameEng ;

i=0;i<5;++i

) that will iterate over the 5 entries of the array collections. 4. In the loop, you have to cast each of the collections (i.e. collections

R,S

and

T

Find the following. (i)

R−T

(iv)

S−P(R)

(typo corrected) [No explanation required for (i)-(v). Brief explanation required for (vi).]

Questions 309

HW4. Q7, please help.

Reference: Fundamentals of Queueing Theory. Fourth Edition. Donald Gross; John F. Shortie; James M. Thompson; Freddie Mac Corporation; Carl M. Harris.

Questions 312

A4B (20 marks) Enhancing a Java Program to Model and Handle Information of Book Order System with File Handling Write a Java program fulfilling the following section. - This assessment work may not reflect a real and complete scenario in actual cases. - Students may refer to Assignment

90.5

Student: 20214321, CHOW Betty, 88888888, PartTime - The class has a "self-testing" method main() to run the class, and the method body does the following: Display a message of self-testing (as sample output) Create 3 Student In fo objects, according to the information provided in Table I(a) Create an array of BookOrder of size 4 , and assign array elements with objects according to the information provided in Table 1(b) and Table 1(c) Display all Bookorder objects (as sample outpur) Finally, display your student's information (name, id, class, year) before program terminates, similar to the format as the sample output display on console below Table 1(b): BookOrder Cample Program Output, when self-testing: java ExtraBookOrder ONLY FOR SELF-TESTING, ExtraBookOrder Order ID: 901 Title: Seven Little Plays Price(HKD) :

315.5

Order ID: 1231 Title: King Kong Price(HKD):

173.5

Student: 20210001, CHAN Tai Man, 98765432

CHAR(5)

category_id INT wh_name VARCHAR(20) product_name VARCHAR(255) wh_addr_line_1 VARCHAR(60) description TEXT wh_addr_line_2 VARCHAR(60) list_price DECIMAL(10,2) wh_city VARCHAR(40) supplier_id INT wh_state

DECIMAL(4,2)

supplier_id INT address_id INT customer_id INT line1 VARCHAR(60) line2 VARCHAR(60) city VARCHAR(40) supplier_city VARCHAR(40) supplier_state CHAR(2) state VARCHAR(2) supplier_zip_code VARCHAR(9) zip_code VARCHAR(10) supplier_phone CHAR(10) phone VARCHAR(12) Indexes Indexes

Questions 315

To be done in greups of two. Pich yeur partnce? Ther Taik: - Call icuit - Slaw cymbel thate - Exin and "while". cetreygustieg to flet levetede. wace browan any twe krumet + INttath

Questions 316

Write a script, Lab07_Q1. py, that creates a numpy array of 7 random integer values between 100000 and 400000. Then, assuming each value in the array represents a number of seconds, calculates and displays the number of days each value represents using element-by-element operations. Hint: there are 60 seconds in a minute, 60 minutes in an hour, 24 hours in a day. You should also display the average number of days. The days should be rounded to 1 decimal place and the average to the nearest integer. Sample Run: seconds

133992

291819

days

=[

1.6

3.4

=2

Questions 317

Create a script, Lab07_Q2.py, that does the following: A. Initialize four one dimensional arrays, with the data shown below: cities - names of the 5 largest (by population) cities in Turkey: 'Istanbul','Ankara','Izmir','Bursa', 'Antalya' first_dose - number of people in each city who have received the first dose of a covid vaccine:

14387810,5269720,4089262,2886255,2371200

. round () function takes a second parameter representing the number of decimals to round to Example: np.round ( my_arr, 3) rounds the values in my_arr to 3 decimal places. G. Calculate and display the percentage of population in each city fully vaccinated (two doses). H. Find and display the names of the cities whose percentage fully vaccinated is over

80%

The number of vaccinated citizens in each city who received only first dose: [2388948

580490

291781

12.52

and a population of [4394694]

Questions 319

1.

HTTP/TCP

4.

SMTP

Questions 322

Suppose, you are at the center of Figure 1. Now you have to take an input, the input will be 24. Rotate the servo motor up to the taken input and measure the distance (e.g., radius of the circle) between you and the circumference of the circle. Measure the area of Figure 1. Write a code to solve the aforementioned problem in Arduino.

Suppose, you are at the center of Figure 1. Now you have to take an input, the input will be 24. Rotate the servo motor up to the taken input and measure the distance (e.g., radius of the circle) between you and the circumference of the circle. Measure the area of Figure 1. Write a code to solve the aforementioned problem in Arduino.

[Please note that, the sonar sensor is place on top of your servo motor and the distance you have received from the sonar sensor is the radius of the circle. The servo will be at Zero Degree (0o) initially.]

4×2

matrix. Now,the main requirement is that I must be found back the original values of the matrixfrom the given result of the matrix. It meansthat LHS

A=9

and

B=7

from 32 means youhave to apply formula on 32 and get back the original values, result but due tothe square in the formula, values have been increased from 255 that's why this formulais not working properly. ONE IMPORTANT point isthat we have information of one value whether it's

Questions 326

To allow for the movement of data in and out of the caches, memory is divided up into pages, contiguous blocks of memory of a fixed size. A page table is used to map the virtual addresses to the physical addresses and lets us work out which pages we need from memory based on what the programmer has asked for, whether pages have been changed, and this allows us to improve efficiency by quickly resolving cache misses. What is the possible advantage if an individual database record can fit within one page?

A,B,C,D,E,F,G,H

should also be considered as valid inputs. - Vertical position of the knight

(a,b,c,d,e,f,g,h)

, then your program should display: Horizontal input for bishop is not a proper letter - The letter should be considered in a case-insensitive way, so

(1,2,3,4,5,6,7,8)

, then your program should display: Vertical input for bishop is not a proper number If both the bishop and the knight are inputted in the same frame, then your program should display: They can't be in the same square If the knight can attack the bishop, then your program should display: Knight can attack bishop If the bishop can attack the knight, then your program should display: Bishop can attack knight If neither of the knight or the bishop can attack each other, then your program should display: Neither of them can attack each other

Section 2 containing the following cells: Note that sections 1 \& 2 can be either on top of each other or side by side but they must make up the first part of your worksheet. Section 3 containing the following cells:

Questions 330

Problem 5 (Throughput) This problem explores throughput, a critical performance measure in computer networks. The throughput at any given time is the rate (measured in bits/second) a host is receiving a file. The average throughput is the transfer time (T seconds) for a file (F bits) = F/T bits

/sec

Link

2R2=2Mbps

R2

reduced to

4∗4

sudoku problem. Sample Input: 1234 3412 2143 4321 Output: Valid Sample Input: 1234 3142 2143 4321 Output: Not Valid Hint: 1. Check for each non-overlapped sub-matrix

Questions 335

At the end of this specific task, students should be able to: • Use core components to create a fully featured user interface.

• Use JavaScript variables to store data.

• Handle button presses.

In this second part, add the following features to the app:

1. The app must allow the user to enter the following details of a book:

2. The app must have a predefined list of genres that the user can choose from.

3. The home screen of the app must display all the details of the last book that the user read.

Questions 337

Write a code in arduino using 7 segment to display 4.

Questions 340

All Learning Units At the end of this specific task, students should be able to:

• Use functions to organise code.

Start by implementing any feedback provided by your lecturer on part 2.

As an assignment, you are asked to code the Hospital Management System described above in C programming language.

The storage space for each letter will be coded to create a static array of 26 elements from the structure shown below.

The content of the structure shown under the name of "Record" will be as follows:

struct Record {

struct Record *nextRecord;

};

hospitallist[i]-> firstLetter =c;

hospitallist [i]-> firstRecordPtr = NULL;

3-) Delete Record (with name, surname, and polyclinic name)

4-) Sort Records By Name

Questions 342

Warm up Exercise: Create a NetBeans project named Week9Lab_Yourld. Include the following interface and classes. 1. An interface Worker that expresses two common operations computePay() meant to return the worker pay and getinfo() meant to return basic information on a worker. 2. Two classes SalariedWorker and HourlyWorker that implement the two above mentioned methods as follows: 2.1. A salaried worker has a name and gets a fixed monthly salary 2.2. An hourly paid worker has a name and a fixed hourly rate and is paid depending on the number of worked hours. 3. A WorkerTester class that asks the user to enter the name, the worker type (hourly worker or salaried worker) and additional information as needed (salary or hourly rate and number of worked hours) and instantiate an adequate object (SalariedWorker or HourlyWorker) referenced by a variable (employee) of type Worker. The worker's pay and the basic information are obtained by calling the two methods (computePay() and getinfo()) through the employee reference. Modify WorkerTester class in such a way it reads from a file (workers.txt) the workers information and stores it in a polymorphic array called workers (of type Worker). The array is then passed to a method called statistics() to display the basic information and the received pay for all Salaried paid workers, the less paid worker and the most paid worker. Assume that each line in the workers.txt contains information about one worker If the worker is a salaried worker, the line contains

Questions 343

a) Simplify the equation using Boolean Algebra and write a sketch for the final equation.

)+A

B

D

(B+

Questions 345

a) Simplify the equation using Boolean Algebra and write a sketch for the final equation.

)+A

B

D

(B+

F=AB

C

C

D+ACD(

B

)

20215678, AU Candy, 12060000

20211234, LAU Andy, 55551111

Questions 348

a) Simplify the equation using Boolean Algebra and write a sketch for the final equation.

)+A

B

D

(B+

x

and

(x,y)

and 1 for radius. - A constructor that creates a circle with the specified

y

coordinate)) Input Format: No. of Objects Repeat the options for all the objects 1 Default constructor 2 Parameterized constructor If option 1 - no input 3 inputs for Option 2 Once inputs are done. Perform the operations based on the number 5 Contains(x,y) // get inputs from the user 6 Contains(object) // pass the second object as an argument 7 Overlap Sample Input: 2 1 - for default constructor 2 - for parameterized constructor 0 0 5 6 //Overlaps Output: Yes Contains

=(s+1)(s+2)

s(s+3)(s+5)

1

=s

G

Questions 351

a) Simplify the equation using Boolean Algebra and write a sketch for the final equation.

)+A

B

D

(B+

L={ab

n

ab

, where

L

. Let

L

. According to the pumping lemma,

(x)+

length

y

? A.

y

comprises the first a-substring C.

(k−1)b

- Purpose of operation: Linked List is implemented through the game practice of "Blowing up the Daogui" . - Scenario Description : At the beginning, manually input

n

) students to join the game. The following description takes eight students as an example. As shown in the picture above, a total of eight students from

A

students in each round. (3) There is a

0.4

++

2%

of sales, COMMISSION

(0.25)

7. Align all column title labels horizontally and vertically at the center.

(0.25)

3. Use AutoFill to put the Employee Numbers into cells A6:A8. (0.25) 4. Set the columns width and rows height appropriately. (0.25) 5. Set labels alignment appropriately. (0.25) 6. Use warp text and merge cells as desired. (0.25) 7. Apply borders, gridlines, and shading to the table as desired. (0.25) 8. Format cell B2 to Short Date format. (0.25) 9. Format cells E4:G8 to include dollar sign with two decimal places.

6%

. (0.5) 12. Calculate the Net Pay; enter a formula in cell G4 to subtract Social Security Tax from Gross Pay. (0.5) 13. Save your work. 1. Add a new sheet (Sheet 3 ) and create the following table: 2. Set the Text alignment, Columns width and high appropriately. (0.25) 3. Use AutoFill to put the Series Numbers into cells A5:A7. (0.25) 4. Format cells C3:G7, C8:E11, C13:E13 to include dollar sign with two decimal places. s. Find the Average Sales and Maximum Sales for each City. (0.5) 6. Find the Total Sales for each Month. (0.5) 7. Calculate the Profit for each month, where profit

(0.5)

8. Calculate the 10\% Bonus, which is 10\% of the Profit. (0.5) 9. Find the Total Sales for each Month; only for sales greater than 30,000 . (0.25) 10. Find the No of Sales for each Month; only for sales greater than 30,000. (0.25) II. Create the following Charts: (1)

Questions 357

Class A ABkOrdersys [4 marks] - Create a public Java class A4BkOrderSys, in file A4BkOrder5ys. java, as the main clas of this updated book order system (for data records). Write and complete the following static method(s) in this program: - public static void main (String[] args) : the program entry point The method main () body does the following: Read data (and display on console) from the student text file "A4BStudents . txt" as an array of students, with method readStudFile of above Java class Student InfoFileUt 11 Write only the part-time students in the array of students above into the text file "A4BPTSts. txt", with method writePTStudFile Read data from the part-time student text file "A4BPTSts .

5,P

.

−□×

File Edit Format View Help StudentInfoytit ? 5 I sIDZ SPTI sPhonel sNamet Ljava/lang/String;

Questions 358

Q. 5 (a) Differentiate ambiguous and unambiguous grammar. When does a context-free grammar is ambiguous? (b) Construct unambiguous contex-free grammar for each of the following. In each case show that your grammar is correct. a. Arithmetic expressions in postfix notation b. Left associative lists of identifiers separated by commas c. Left associative lists of identifiers separated by commas d. Arithmetic expressions of integers and identifiers with the four binary operators

(+,−,

b.

(a∣b)∗a(a∣b)(a∣b)

S→yzS

S→yyS

Questions 360

hello, can you please solve this with MS access, thanks.

The third list has a list of tax exemptions based on the number of dependents a consultant has; for dependents up to 2, there is a tax exemption of 2.5%, for dependents up to 5, there is an exemption of 5%, and for dependents more than 5, there is an exemption of 7.5%. The tax for each employee is at a fixed rate of 20% of their earnings.

Tasks

Notes: Use self-documentation for table and field names.

Avoid single letters for variable or array names.

2.1.1. Create a relationship among the tables with cascading delete and update.

Queries to list employees, dependents, and tax rates, respectively (three queries)

4.1.4. Consultant tax at 25% maximum

Forms to show entry into each table.

002,Elizabeth, Adam,6000,Sales Manager, NULL

003,Berth, Ellis, 7500,Consultant,NULL

Employee_id size 3, first name size 13, last name size 12, job id size 15, and tax exempt code size 1 are text; salary is numeric with 2 decimal places.

DEPENDENT [Table]:

002,Denise, Ellis, 19/08/2004

002, Robert,Ellis, 02/01/2006

008,Anna,Dicken,05/10/2006

008, Victoria, Dicken, 31/12/2007

TAX_EXEMPT [Table]:

Tax id.Tax rate

Questions 361

Q. 4 (a) What is meant by parsing. Explain top down and bottom up parsing with examples. (b) Difference between an LL and Recursive Descent parser? (c) Construct recursive descent parsers for the following grammars: a. 0 S

create table customer (

c_custkey int,

c_region varchar(12),

c_phone varchar(15),

lo_linenumber int,

lo_custkey int,

lo_shippriority varchar(1),

lo_quantity int,

lo_supplycost int,

lo_tax int,

select c_nation, SUM(lo_revenue) as SUM

from customer, lineorder

order by AVGL;

Questions 363

. c. D.

Questions 365

) \{ int total

=0;

=

total

please write a proper program give me fast.cpp

Questions 368

Questions 369

create table dwdate (

d_year int,

d_yearmonthnum int,

d_monthnuminyear int,

d_weeknuminyear int,

d_weekdayfl varchar(1)

);

lo_partkey int,

lo_suppkey int,

lo_extendedprice int,

lo_ordertotalprice int,

lo_commitdate int,

lo_shipmode varchar(10)

p_mfgr varchar(6),

p_category varchar(7),

p_container varchar(10)

);

and lo_partkey = p_partkey

and d_sellingseason = 'Fall'

A binary tree is a tree-type non-linear data structure with a maximum of two children for each parent (element). Every node in a binary tree has a left and right reference along with the data element. The node at the top of the hierarchy of a tree is called the root node. Each node of a binary tree consists of three items: - data item - address of left child - address of right child Methods to implement: preOrderTraversal() inOrderTraversal() postOrderTraversal() Traversal methods for the node-based Binary Trees Binary tree traversal methods for this lab:, inOrder, preOrder and postOrder The inorder traversal of the tree is: Allows to see the sorted tree 1. Traverse the left subtree: inOrder (leftSubtree) 2. Visit the current node. 3. Traverse the right subtree: inOrder (rightSubtree) The preorder traversal for the tree is:

10

8

4

12

2. Write a program to explain virtual function by creating a base class Account which has virtual function deposit () and withdrawal(). Two classes Saving and Current Account derived from Account and they have deposit() and withdrawal(). Deposit is to add the balance into your account and Withdrawal is to get the withdrawal amount. Write a member function to get the deposit and withdrawal amount and to update the balance information

for current and savings etc. Write a member function to display the balance information for respective account.

cal2: the calendar of the second person

length: the length of the meeting in half hour increments

. What are the values of param 1 and local1? Now select the activation record for the copy of method m3 closest to the top of the execution stack (where is the top of the execution stack); what is the value of variable i? Write your answers in AnswersLab8.txt. 6. Select the activation record for method m1(). Press F6 (or click on Step Over). A message is printed on the screen. Press F6 again. How did the execution stack change? Write your answer in AnswersLab8. 7. Keep pressing

F6

The only difference between first and subsequent iterations is that in first iteration you have to pick the initial centers. Starting from the 2nd iteration, the centers will be given to you by a previous pass of KMeans, and so on. Include the centers you computed at each iteration in your answer.

Questions 375

2

+y

0

1

2

(x+y

a location, choose from a list of registered locations. Alternatively, you can enter a location that is not included in the list. This place will then be registered in the system with an ID and place name but without an address.

Note: The original function is based on a class Agreement.

while "startdate" not in input_agreement:

try:

except ValueError:

print("Input is wrong")

input_agreement["starttime"] = datetime.time(time, min)

except ValueError:

except ValueError:

print("Use a value for duration")

& Create instances (objects) for the classes UserInterface, StudentInformationSystem, Course, Student. & 4 Marks \\ \hline

4.2

Download the java files ReentrantLockClass.java and ThreadSystem.java. You are required to add two extra java class files to demonstrate lock and unlock.

public class ThreadSystem {

B b=new B(r);

Thread t1=new Thread(a);

}

------------------------------------------------------------------------------------------------------------

public void print(int count)

{

{

System.out.println(count*i);

{

e.printStackTrace();

}

}

Make a program that counts the number of "STAR" ('S', 'T', 'A' and 'R' are entered in a row) from the user input. - The program terminates when EOF is entered. Example 1 Input STARstarSTAstaSTASSTAR Output The number_ of STAR

try{

sem.acquire(); // critical section \} catch (InterruptedException ie)

Questions 382

3. [12pts] We have seen in class how to construct an incremental algorithm to find the maximum, minimum elements using at most

n=2

k

1. Write a program in C++ that creates a class parcel containing private member variable weight (of the parcel), protected variable shipping_cost. Write a constructor that initializes these variables. Write a member function with name Call_shipping() to calculate the shipping cost according to formula Rs. 10/kg, which will be stored in the variable shipping_cost. Create a class called Box, which is publicly inheriting Package class. It should have private member variable height,width and depth. Write a constructor to initialize these variables. Override Call_shipping() function defined in class Parcel and add Rs. 30 to shipping_cost variable if volume of the box exceeds 3 units. Also write a member function to print total shipping cost. Write a main function that creates Box class object, assigns weight, height, width, depth. Print shipping cost of the object. Do not use friend functions in this program.

plzz write proper program in c++

? A. B. C. D. Resel Selection

Rating

*Homework: 10%

Questions 387

[12pts] Suppose that you are given

Θ(n

2

Questions 388

Hello, we have a study about java. Can you help with code? Thanks

C++

program to find the subtraction of 2 numbers entered by user. 3. Write a

C++

program that asks the user to type the coordinate of 2 points,

A

and

Questions 390

Start your trial now! First week only $6.99! arrow_forward search SEARCH ASK CHAT Question thumb_up 100% Question#2) Case Study: JazzN!ghts is a famous Jazz festival, held in Zurich every year. Since its first edition in 1986, it has gone through several major changes regarding its structure, length and location, but the tickets have always been sold in a traditional way: through two events agencies. The organizers decided to completely modernize the tickets selling system and created the following concept. From this year on, the tickets will be sold in three distinct ways: traditionally, i.e. by the two events agencies, in electronic format directly on the festival website, and through SBB. All parties will have access to the same unique tickets database of the new system, to avoid double selling. A partnership with the SBB railway company needs to be set up, such that SBB can sell combi-tickets including both the festival admission fee and the train ride to the festival venue at reduced price, from anywhere in Switzerland. This way, more music fans would have easier and cheaper access to JazzN!ghts. Moreover, the system will have to be extended to support not only German, but also English, French and Italian. Since tickets will also be sold online, SecurePayment Inc. will be contracted to provide and ensure the security of the online payment service. The JazzN!ghts event manager will take care and negotiate all these details with the involved parties. Additionally, upon arrival at the festival venue, each participant has to self-check in at a touch screen terminal, which scans the barcodes on his/her ticket and issues a bracelet with an electronic chip. This can be used to load money, such that whenever (s)he wants to purchase snacks or beverages, (s)he does not have to use cash any more, thus reducing waiting times. This measure was initiated by the program manager and will be deployed by WristSolutions Inc. Lastly, according to the cantonal laws, the way the payment transactions are performed has to be audited by an external company at the end of the festival, since this is a public event, where the municipality of Zurich is also involved - allowing free use of the public space. b) Identify and name all the stakeholders of the JazzN!ghts new tickets selling system. c) Identify all the use cases in the JazzN!ghts case study and represent them in a UML use case diagram. Transcribed Image Text:Question#2) Case Study: JazzN!ghts is a famous Jazz festival, held in Zurich every year. Since its first edition in 1986, it has gone through several major changes regarding its structure, length and location, but the tickets have always been sold in a traditional way: through two events agencies. The organizers decided to completely modernize the tickets selling system and created the following concept. From this year on, the tickets will be sold in three distinct ways: traditionally, i.e. by the two events agencies, in electronic format directly on the festival website, and through SBB. All parties will have access to the same unique tickets database of the new system, to avoid double selling. A partnership with the SBB railway company needs to be set up, such that SBB can sell combi-tickets including both the festival admission fee and the train ride to the festival venue at reduced price, from anywhere in Switzerland. This way, more music fans would have easier and cheaper access to JazzN!ghts. Moreover, the system will have to be extended to support not only German, but also English, French and Italian. Since tickets will also be sold online, SecurePayment Inc. will be contracted to provide and ensure the security of the online payment service. The JazzN!ghts event manager will take care and negotiate all these details with the involved parties. Additionally, upon arrival at the festival venue, each participant has to self-check in at a touch screen terminal, which scans the barcodes on his/her ticket and issues a bracelet with an electronic chip. This can be used to load money, such that whenever (s)he wants to purchase snacks or beverages, (s)he does not have to use cash any more, thus reducing waiting times. This measure was initiated by the program manager and will be deployed by WristSolutions Inc. Lastly, according to the cantonal laws, the way the payment transactions are performed has to be audited by an external company at the end of the festival, since this is a public event, where the municipality of Zurich is also involved - allowing free use of the public space.

for T(n) and prove your bound is correct using induction.

(b) [12pts]T(n)=2T(⌊n/2⌋)+2nlogn,T(2)=4

Questions 394

2. Develop a C program to calculate

+N

by using do while loop.

1+2

∗∗

4

loop.

Questions 395

Hello, I needed help with this question related to context free grammar. In the following image, there are rules for a grammar L2 laid out, however, there is a mistake in the rules of the grammar. I need help finding a way to change a single rule of the grammar in order to fix the error. Thank you for the help.

Questions 397

A sample program dialogue is shown below. pitat' 3 your waje ef a: 4,2 What.' 3 you value of b:

11

of

−320,473 B

your redtangle hą ared

Convert to a DFA the following NFA:

Questions 399

list[int]: Your method name and input variable names must match exactly to what you see above. The case sensitivity must match exactly as well. If you do not do that, you will get zero credit because that would prevent our testing script from executing on your program. Examples: - Input: matrix

=[[1,2,3],[4,5,6],[7,8,9]]

Output:

[6,4,2,1,3,5]

Output:

[12,8,4,3,2,1,5,9,10,11,7,6]

matrix[i].length -

1<=n,m<=10

dq0

reference frames,

θ

x

respectively.

=

−θ

y

1

x

−θ

x

0

0

Questions 401

1

2

+(y

)

and

y2

Gimme a

vaL

for

y2:−1,1

Gimme a viane lor

y

{a,b,c,d}

. b) 0101, 101, and 011. c) ab, bc, and ca. Assume the alphabet is

Questions 404

Kleene's theorem can be used to turn a transition graph (TG) into a regular expression. Which one of the following regular expressions would generate a language that would be equivalent to the language described by the following TG? A.

(ab+ba)(ab

(ab+ba)(aba)bab

D.

ab

Questions 405

. Exercise 2.4.2: Convert each of your NFA's from Exercise 2.4.1 to DFA's.

Questions 406

- Can be read and understood easily -

10%

2 Project In this project you will be creating your own version of a UNIX shell. It will not be as sophisticated as bash, the shell you have been using in Linux, but it will perform similar functions. A UNIX shell is simply an interactive interface between the OS and the user. It repeatedly accepts input from the user and initiates processes on the OS based on that input. 2.1 Requirements 1. Your shell should accept a

−p

on command line options for more information. 2. Your shell must run an infinite loop accepting input from the user and running commands until the user requests to exit. 3. Each line of user input should be treated as either a builtin command, or a command to be executed. See section

2.2

Minimum Steiner Tree: A minimum-weight tree connecting a designated set of vertices, called terminals, in an undirected, weighted graph.

Example: The dashed edges constitute the tree.

First provide a pseudocode for your heuristic.

Second generate 3 small graphs. (Total number of nodes could be from 5 to 10 and the number of terminals could vary from 3 to 5)

Please use Python to write the algorithms of insertion sort, bubble sort, merge sort and binary search in the textbook. And refer to the following file input and output styles to achieve.

Questions 409

disk activity. Your customers are complaining that the system is slow. After doing some research, you have learned that you can upgrade your disks to 2.4 times as fast as they are currently for

$7,000

. (20 points) 1. Which would you choose to yield the best performance improvement for the least amount of money? 2. Which option would you choose if you don't care about the money, but want a faster system?

Questions 410

If X is not prime, compute and print the factors of that integer X

Evaluate and print the equation Y=8X²+ 1, for X values from -5 to 5 using the range function and for loop

Exercise 2.5.1: Consider the following

ϵ

2. Name the four types of

I/O

Suppose you have the following matrices

A=

4

7

3

8

5

1

1

such that

P

=B

S−R

latch, determine the

outputs for the input below, show them in proper relation to the enable input, assume

Exercise 3.2.1: Here is a transition table for a DFA: * a) Give all the regular expressions

R

q

i

R

ij

ij

(2)

.

Questions 420

javascript

const ticketLabel = document.getElementById("ticketLabel");

const diningLabel = document.getElementById("diningLabel");

////after page loading, this only show once

(function () {

ticket.style.display = "block";

dinings.style.display = "none";

});

diningLabel.addEventListener("click", function () {

ticketLabel.style.backgroundColor = "white";

hotelLabel.style.backgroundColor = "white";

ticket.style.display = "none";

hotelLabel.style.backgroundColor = "rgb(206, 204, 204)";

const t2 = document.getElementById("t2");

const t3 = document.getElementById("t3");

const h3 = document.getElementById("h3");

const h4 = document.getElementById("h4");

const d2q = document.getElementById("d2-qty");

const h1q = document.getElementById("h1-qty");

const totalqty = document.getElementById("totalqty"); //total

const tr1 = document.getElementById("tr1");

const markup = `

<tr >

if (t1q.value != "" && t1q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (t2q.value != "" && t2q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (t3q.value != "" && t3q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (d1q.value != "" && d1q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (d2q.value != "" && d2q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (h1q.value != "" && h1q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (h2q.value != "" && h2q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (h3q.value != "" && h3q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const markup = `

<tr >

if (h4q.value != "" && h4q.value > 0) {

tr1.insertAdjacentHTML("beforebegin", markup);

const table = document.getElementById("tablee");

document.getElementById("undo").addEventListener("click", function (e) {

const qty = table.rows[i].cells[1].innerText;

total -= qty;

total += +value;

totalqty.innerHTML = total;

question:

may i know how to get the correct total amount of the ticket?

A) No comments were provided for the program codes, you should add comments for the main steps of the codes.

B) Majority of the data type used for Profile table did not match with the task requirements, it should be used the data type as provided in the table:

In the case of emergency patient there is room number.

Using files or database to manage the data in all the required functions.

Questions 423

Part 3: Identify Root Bridge Root Bridge is the switch that has the smallest Bridge ID. Switch1 < Switch0 < Switch3

Questions 425

Exercise 4.1.1: Prove that the following are not regular languages. a)

∣n≥1}

. This language, consisting of a string of 0 's followed by an equal-length string of 1's, is the language

{0

n

{0

n

∣n

and

{0

n

{0

n

Questions 426

Assignment 5 will use vectors, file

28×28

greyscale image in a readable/text format called portable greymap (pgm). Figure 1 displays each image for digits 0-9 from the MNIST data set. Download the images.zip file on Canvas to complete this assignment. The pgm format stores pixel color values in a single number that ranges from

<255)

is a shade of grey. See the section in this handout on pgm for more details about the format. Figure 1: Example

>

standard library. Loading the Image Files The images will be read into the program using a function declared as: void read_pgm_images (std: :vector< \& images, std: : vector\& filenames, int img_size); Where byte is type defined as an unsigned char, images is a vector of byte pointers and filenames is a vector of image file names: std: : vector images; typedef unsigned char byte; std: :vector⟩ filename_vector

' for white (va old) or a space ' ' for all other values. The threshold can be anything greater than 0 . The ex handout use a value of 150 . The draw(...) function will output an '*' for a pixel with a value

0−255

for red,

ppm

format in this handout for more details about RGB colors and the ppm format (Figure 2 ). Figure 2: The 8-digit in ppm format with background and font recolored as input in the example on page 2 of this handout. The algorithm to transform the greyscale image into a color image will be as follows (is linear interpolation): \begin{tabular}{l} \hline Algorithm 1 Colorize \\ \hline font_color

>0

then \\ color_pixel[

font_color[2] \\ else \\

background_color[1] \\ color_pixel[2]

user RGB triplet \\ for all pixel_values in image do \\ for all

i

then \\

C←

is the percent font contribution

}

+

font_color[i]

background_color[i] \\ end if \\ end for \\ end for \end{tabular} File I/O: reading and writing data in pgm \& ppm format: The function read_pgm_images will read in ten pgm images and store them in a single vector of dynamic byte arrays. For example, a single digit can be stored in the vector using the memory created as: image.push_back(new byte

[28∗28])

that represents the greyscale format, the next line is width and height

(555

; void write_to_color_pgm_images(std: vector∗>& images, int imgsize, Color bkg, Color font, std::string filename, int digit); The ppm file format (Figure

3 b

, and blue

(B)

, or

B)

image. See ppm data below. Figure 3: (a) Portable greymap (PGM) and (b) portable pixmap image formats. PPM Image Format: Tip: Each image is stored in row-major order. This means that when viewing the image, the top left coordinates (row,col) are

(0,0)

files there is a free program called irfanview to load and convert image formats. Irfanview can convert ppm from ascii to binary and to png, jpg, etc. Use irfanview or a viewer of your choice.

x

(a) (15 Pts) Design (step-by-step) and implement an 1-bit Arithmetic Logic Unit (ALU) that will perform the following arithmetic and logical operations: - NOT b - a AND b - a OR b

−a+b

(−)

operations. (b) (10 pts) Test the final design, using LogiSim, with just one set of data. Include an image of the circuit (from Logisim) in your report.

2

(n+1)

coils and

cos(ωt+ϕ)

is 1 . 3. If the number of resistors is

n

. The user will be prompted to enter the correct number if it is different from

(n+1)/2

]

and Phase values

V

, entered by the user respectively, the voltage magnitudes can be any real number. The values of all resistances, inductances and capacitances must be real and positive. It is required to find the mesh currents based on Ohm's law:

V=ZI

is the impedance matrix, and

I

Modes of operation (Cryptography)

Given a plaintext and encryption of the massage (Please meet me at Union Station: 7:00 be prompt!) encrypted with AES key and IV(which are not given) using CBC with PKCS7 padding.

4. Can you employ the approach used to solve part (1) to change the location word, e.g., from “Apple:” to “Banana” within the plaintext? And Why

Questions 430

The purpose of this task is to create a gradebook for a cyber-subject for different students enrolled at CIT. For example, you will create a gradebook for two students. Please follow the below steps to complete the task.

· Create two dictionaries;

· Next, define a new function called letter_grade that has one argument called score and expect it to be a number. Inside the function, use elif chain to test the score like below:

· Next, define another function called class_average that has one argument, students. You may consider students to be a list that consists of two students.

a) The roots of a quadratic equation

f(x)=ax

2a

−b±

. Develop a function to implement this formula given values of coefficients. (5 marks) b) Develop a M-file to plot the function

+6x+2

over the range of

,f∘r−4≤x≤4

, for

−6≤x≤6

, for

+1

, for

4.4

Exercise 4.4.1: In Fig.

H

, and cell locations theta and rho. - hough_peaks: Returns the peak locations (theta and rho) for a given

t

, and another parameter

Questions 436

Write a

−1

. vi) In the main function, read the values of the parallel arrays using read, print the arrays in a tabular format using print, and print the code of the bestselling book using findBestsellingBook. vii) Also in the main, ask the user to enter a code, search for it using findTotalsalesBycode, and if the book is found, display the total number of sold books; otherwise, display an error message.

F=x⊕y⊕z

(a) (15 pts) A 4:1 Multiplexer and ONE external logic gate. (b) (15 pts) A 2:1 Multiplexer and TWO external logic gates.

operation doesn’t have new or old value, please put a NULL value in the fields.

1. _____ (2 points) create a table HW2_test1 (id, name, price, qty) where id is int type, auto increment and

timestamp when the operation happens, old_price is the current price value in the HW2_test1 table,

new_price is the new price value will be replace the current value, and note is a note for the operation

delete operation on the HW2_test1 table. You should display an error message to the user and not let the

record got deleted. The note should be “Cannot delete the item xxxx” where xxxx is the name of the

log the new and old prices and corresponding note “update item xxxxx” into the audit table where xxxx is

the name of the record user tried to update.

H

, theta, and rho arrays. The function also should take a threshold value

s

to return the strongest

-2E10 +1F10

Questions 442

to

2 m

- capacity, where

n

Can't be determine with the information given

1+2k

4.14

is the transition table of a DFA. a) Draw the table of distinguishabilities for this automaton. b) Construct the minimum-state equivalent DFA. Exercise 4.4.2 : Repeat Exercise 4.4.1 for the DFA of Fig 4.15. 166 CHAPTER 4. PROPERTIES OF REGULAR LANGUAGES Figure 4.15: Another DFA to minimize

https://www.kaggle.com/datasets/dpamgautam/video-file-for-lane-detection-project

Display detected lanes and the “frames per second”(fps)on the video.

You are playing a game where you roll a fair 6 -sided die, and based on the outcome of your roll: you get

$1

(if you roll a 4),

$20

times, and if the sum of your earnings is at least

$x

for playing. (That is, your earnings end up being negative 100 dollars.) For example, if

n=2

for the play, and since this is greater than or equal to

x=10

), if we roll a 1 and then a 3, we lose since

$1

−$100

for the single play. (For the program,

$x

), and 2. if you play this game repeatedly, the average amount you will win (where the amount you win in a game could be negative). Here is a bit more direction: you should simulate 1,000,000 plays of this game. Each simulated play involves rolling a six-sided die

$1

if you roll a 1 or a

$20

if you roll a 5 , or

n

rolls, your earnings for that play are

total number of simulated games

number of winning simulations

−100

dollars). After completing the simulations, print out your program's estimates for both. (This is set up for you already in the provided template file and specified to print to the desired number of decimal places.) Do not change anything provided in the template, and insert your code in the provided area (between the hashtag lines). You should use the variables provided in your code. Specifications: your program must - NOT ask the user for any additional input. (Ignoring the input lines already provided in the template.) - print out an estimate of the probability that

−100

, the latter when the sum of the

Questions 448

Write a script file to demonstrate lanedetectionon the followingvideo:

Groan Enter Your Name and Roll the Dice Enter Player 1 Name: Winner

Questions 450

You are viewing 1/3rd of the document.Purchase the document to get full access instantly

Immediately available after payment
Both online and downloadable
No strings attached
How It Works
Login account
Login Your Account
Place in cart
Add to Cart
send in the money
Make payment
Document download
Download File
img

Uploaded by : Abram Upadhyay

PageId: ELID8B7566