Web development and programming
191828 questions • Page 70 / 3837
(a) Implement a class Student. For the purpose of this exercise, a student has a
(a) Implement a class Student. For the purpose of this exercise, a student has a name and a total quiz score. Supply an appropriate constructor and methods getName(), addQuiz(scor…
(a) Implement a class that can generate a sequence of pseudorandominterger by (m
(a) Implement a class that can generate a sequence of pseudorandominterger by (multiplier * seed + increment) % modulus Each time a new randomnumber is computed, the value of thes…
(a) In C++language, multiplication and division operations have same priority (b
(a) In C++language, multiplication and division operations have same priority (b) In C language, C++ functions can not be used (c) In the hex-decimal notation FFF refers to 4095 (…
(a) In Exercise 1, suppose that a single burst of consecutive bit errors occurre
(a) In Exercise 1, suppose that a single burst of consecutive bit errors occurred in the transmission of C. What is the smallest number of consecutive bit errors that the code wou…
(a) In a certain game you can collect points. The first day you collect 1, the n
(a) In a certain game you can collect points. The first day you collect 1, the next day you can collect 2, the third day you collect 4, ... Each day you double the amount compared…
(a) In a round-robin tennis tournament with n players, every tennis player plays
(a) In a round-robin tennis tournament with n players, every tennis player plays against every other player. Let T(n) be the total number of tennis matches taking place among the …
(a) In each of the following, write a program segment using a for loop to displa
(a) In each of the following, write a program segment using a for loop to display the numbers. (i) 2 5 8 11 14 (ii) 2 4 16 256 (iii) 25 12 6 3 1 (b) In this part, we will write a …
(a) In the slides and textbook, one of the examples features a class for countin
(a) In the slides and textbook, one of the examples features a class for counting up. An interface which defines this functionality is given below: public interface IncrementCount…
(a) Learning debugging is important if you like to be a programmer. To verify a
(a) Learning debugging is important if you like to be a programmer. To verify a program is doing what it should, a programmer should know the expected (correct) values of certain …
(a) Let Z 0,1,.,n-1). Write an algorithm (use pseudo-code) to determine whether
(a) Let Z 0,1,.,n-1). Write an algorithm (use pseudo-code) to determine whether a function f:Z Z is injective. That is, supply a "Method" to go with Input: A number n ? Z and a fu…
(a) Let d > 2 be a fixed positive integer. consider a perfect SkipList construct
(a) Let d > 2 be a fixed positive integer. consider a perfect SkipList constructed as follows: In order to create the ith level Li of the SkipList, we scan the keys of level Li…
(a) Let us assume that the processor testing is done by filling the PC,registers
(a) Let us assume that the processor testing is done by filling the PC,registers, and data and instruction memories with some values (you can choose whichvalues), letting a single…
(a) Linked Lists: (i) Declare a struct to represent a node in a linked list. The
(a) Linked Lists: (i) Declare a struct to represent a node in a linked list. The node should have an integer datum field and a pointer to the next node. (ii) Declare a variable to…
(a) List all structures that are both heaps and binary search trees. Assume that
(a) List all structures that are both heaps and binary search trees. Assume that all elements of the structures have different values. (b) Use the linear-time heap creation algori…
(a) List the FOUR main elements of a computer. (b) What are multiprogramming and
(a) List the FOUR main elements of a computer. (b) What are multiprogramming and multithreading? (c) List Two advantages of user level threads (ULTs) over kernel level threads (KL…
(a) Look at this small block of ARM assembly language code: MOV R1,#0x4B MOV R2,
(a) Look at this small block of ARM assembly language code: MOV R1,#0x4B MOV R2,#-3 ADD R2,R1,R2 SUB R2,R1,R2 After the code has executed in sequence, what decimal values are left…
(a) Modify the following function so that it performs N steps of the Adams-Bashf
(a) Modify the following function so that it performs N steps of the Adams-Bashforth-Moulton combination in PECE mode. function [x,y] = ab4 (x,y,h,N) % The first 3 steps are taken…
(a) Name FOUR techniques for memory management. (b) What is overlaying in progra
(a) Name FOUR techniques for memory management. (b) What is overlaying in program execution? Give an example for the overlaying operation. (c) A page table of a process is shown i…
(a) Please Fill in the table and calculate the total time needed for each instru
(a) Please Fill in the table and calculate the total time needed for each instruction (b) What will be a good time for a single cycle time? When we adopt a multicycle implementati…
(a) Plot the probability density function for z-statistic and t-statistic of 4 s
(a) Plot the probability density function for z-statistic and t-statistic of 4 sample size in the same figure for z or t in the range of [-4 4]. Use a vertical line to label the u…
(a) Plot the velocity v versus time t from 0 to 30 s. Add labels and grid. Use M
(a) Plot the velocity v versus time t from 0 to 30 s. Add labels and grid. Use MATLAB fplot function. (b) Define a vector t from 0 to 30 with step size 3 and find the correspondin…
(a) Q = 0.4k^0.6 L^0.7 MP_k = d theta/d k = 04 times 0.6 k^0.6 - 1 L^0.7 = 0.24
(a) Q = 0.4k^0.6 L^0.7 MP_k = d theta/d k = 04 times 0.6 k^0.6 - 1 L^0.7 = 0.24 k^-0.4 L^0.7 the value of k = 200 and L = 2000 MP_k = 0.24 (300)^-0.4 (2000)^0.7 = 0.24 times 0.102…
(a) Read a JPG image into Matlab, display that image with the imshow function. (
(a) Read a JPG image into Matlab, display that image with the imshow function. (b) Decrease the red and green color values in the image to one-half the original values, and displa…
(a) Reference the diagram of a fish shown below. The formula to calculate the ap
(a) Reference the diagram of a fish shown below. The formula to calculate the approximate weight for mo species of freshwater fish is: WEIGHT = LENGTH * GIRTH ^ 2 / SHAPE FACTOR A…
(a) Retrieve the names of employees in department 5 who work more than 10 hours
(a) Retrieve the names of employees in department 5 who work more than 10 hours per week on the 'ProductX' project. (b) List the names of employees who have a dependent with the s…
(a) Routing is performed in the domain shown in figure Q1 using OSPF in multi ar
(a) Routing is performed in the domain shown in figure Q1 using OSPF in multi areas configuration. The links in solid line, between routers R1, R2, R3 and network N1, belong to Ar…
(a) Run Dijkstra\'s algorithm on this graph to compute the shortest paths betwee
(a) Run Dijkstra's algorithm on this graph to compute the shortest paths between 0 and every other node. For reference, the algorithm is shown on the next page. Use the adjacen…
(a) Scheduling. IT is trying to write a scheduler for two identical machines. Th
(a) Scheduling. IT is trying to write a scheduler for two identical machines. They know that there are n jobs and that the ith job takes ti seconds, regardless of which machine it…
(a) Scoping .For each variable use site in the above code, draw an arrow from th
(a) Scoping.For each variable use site in the above code, draw an arrow from the use site to the binding site? Hint: There a total of 7 use sites. (b) Evaluation.Whatdoesf(3)evalu…
(a) Solve the following three equations for x1, x2, x3 in terms of b1, b2, b3. (
(a) Solve the following three equations for x1, x2, x3 in terms of b1, b2, b3. (Hint: Use matrix multiplication to write-out each of the three equations.) (2 pts) [1 0 0; 1 1 0; 1…
(a) Some of the characteristics of a book are the title, author(s), publisher, I
(a) Some of the characteristics of a book are the title, author(s), publisher, ISBN, price, and year of publication. Design the class bookType that defines the book as an ADT. Eac…
(a) Some of the characteristics of a book are the title, author(s), publisher, I
(a) Some of the characteristics of a book are the title, author(s), publisher, ISBN, price, and year of publication. Design the class bookType that defines the book as an ADT. Eac…
(a) State if the following are valid identifiers or not. If not, give your reaso
(a) State if the following are valid identifiers or not. If not, give your reason(s) in a few words. (i) class (ii) 3c (iii) easy2Learn (iv) p-q (v) thanks (b) Write down the most…
(a) State three famous computational problems known to be NP-complete. (1 mark)
(a) State three famous computational problems known to be NP-complete. (1 mark) (b) State one famous computational problem known to be in NP and co-NP, but not known to be in P. (…
(a) Suppose a security code can be any string of five or fewer digits in length.
(a) Suppose a security code can be any string of five or fewer digits in length. How many security codes are there? (b) A typical image on the internet is of size 640 × 480. (How …
(a) Suppose that the Bubble Sort algorithm runs on the array (5, 4, 3, 2,1). Wha
(a) Suppose that the Bubble Sort algorithm runs on the array (5, 4, 3, 2,1). What will be the content of the array after the first iteration of the outer loop? After 4 marks 4. th…
(a) Suppose that x is declared as int and has the value 5. Fill in the following
(a) Suppose that x is declared as int and has the value 5. Fill in the following table indicating the number of bytes sent from the Arduino out of the serial port and the value(s)…
(a) Suppose that you are given an instance of the MST problem on a graph G, with
(a) Suppose that you are given an instance of the MST problem on a graph G, with edge weights that are all positive and distinct. Let T be the minimum spanning tree for G returned…
(a) Suppose the following LC-3 program is loaded into memory starting at locatio
(a) Suppose the following LC-3 program is loaded into memory starting at location x30FF: x30FF 1110 0010 0000 0001 x3100 0110 0100 0100 0010 x3101 0001 0100 0100 0001 x3102 0001 0…
(a) Suppose we r sort to sort the numbers below, a radix of 10. show the g state
(a) Suppose we r sort to sort the numbers below, a radix of 10. show the g state of the sort after pass, after the sorting is complete. second not Numbers to sort (in their initia…
(a) Taking an unnormalised list, describe how you would normalise it using the n
(a) Taking an unnormalised list, describe how you would normalise it using the normal forms technique and show how the result of this method is used. (b) You are currently in the …
(a) That all of the assets and equities on the balance sheet do exist (b) The au
(a) That all of the assets and equities on the balance sheet do exist (b) The audit controls must be applied per each accounting period within the annual report (c) For assessing …
(a) The C programming language distinguishes character constants from string con
(a) The C programming language distinguishes character constants from string constants by using single quotation marks for characters and double quotation marks for strings. Thus,…
(a) The MOD number of a counter is equal to the number of complete states that a
(a) The MOD number of a counter is equal to the number of complete states that a counter goes through before it recycles back to its starting state. To construct a ripple counter …
(a) The concept of a class is central to Object-Oriented Programming TRUE FALSE
(a) The concept of a class is central to Object-Oriented Programming TRUE FALSE b) A private member variable of a class cannot be accessed directly by name from a pri- vate member…
(a) The cycle time of a microprocessor is the time for one complete clock cycle.
(a) The cycle time of a microprocessor is the time for one complete clock cycle. For example, if the clock frequency of a microprocessor is 2 million cycles per second (2 MHz), th…
(a) The following figure describes a TCP three-way handshake process. Three type
(a) The following figure describes a TCP three-way handshake process. Three types of packets are used in the figure. What are the three packet types? (3 points) Fill in blanks (5 …
(a) The following figure describes a TCP three-way handshake process. i Three ty
(a) The following figure describes a TCP three-way handshake process. i Three types of packets are used in the figure. What are the three packet types? (3 points) ii. Fill in blan…
(a) The following figure describes a TCP three-way handshake process. i. Three t
(a) The following figure describes a TCP three-way handshake process. i. Three types of packets are used in the figure. What are the three packet types? (3 points) …
(a) The number of atoms of a strange element on Earth per hour is the average of
(a) The number of atoms of a strange element on Earth per hour is the average of the number of atoms in two previous hours. Assume that there were 100,000 atoms in hour 1 and 300,…
Subject
Web development and programming
Use Browse or pick another subject.