Blog

Coursehelp
March 21, 2019
QUESTION : No Comments

(Solved) : 13 Complete Following Method 12 Points Public Void Printoceanbymaxdepth Stringtl Oceanname Q29452825

13) Complete the following method (12 points): public void printoceanByMaxDepth(stringtl oceanNames, int [ ] maxDepthsMe ters) { … } Assume names and maximum depths of all oceans are unique, and maxDepthsMeters [ contains the maximum depth of oceanNames[i for any i. Your method should first use an assertion to make sure the two input arrays have the same length. Then print one line for each ocean in oceanNames, like the following: Maximum depth of Indian Ocean is 8047 meters. The output should be in ascending order by depth. ZERO POINTS FOR ANY SOLUTION THAT RUNS IN O(n2) TIME OR WORSE.

13) Complete the following method (12 points): public void printoceanByMaxDepth(stringtl oceanNames, int [ ] maxDepthsMe ters) { … } Assume names and maximum depths of all oceans are unique, and maxDepthsMeters [ contains the maximum depth of oceanNames[i for any i. Your method should first use an assertion to make sure the two input arrays have the same length. Then print one line for each ocean in oceanNames, like the following: Maximum depth of Indian Ocean is 8047 meters. The output should be in ascending order by depth. ZERO POINTS FOR ANY SOLUTION THAT RUNS IN O(n2) TIME OR WORSE. Show transcribed image text

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 6 Bit Two S Complement Bit Pattern Representing Number 17 8 Bit Two S Complement Repres Q27789371

13. What is the 6-bit twos complement bit pattern representing the number -17? What is the 8-bit twos complement representation of the same mumber? The 16-bit representation?13. What is the 6-bit two’s complement bit pattern representing the number -17? What is the 8-bit two’s complement representation of the same mumber? The 16-bit representation? Show transcribed image text

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 8×1 Multiplexer Inputs B C Connected Selection Input S2 S1 Respectively Data Inputs Lo Q28523548

13) An 8x1 multiplexer has inputs A,B, and C connected to the selection input S2,S1, and So, respectively The data inputs lo through l7 are as follows: a) 11=12-I,-0;1,-1,-1,1,-14-Dand-I,-D Determine the Boolean function that the multiplexer implements

13) An 8×1 multiplexer has inputs A,B, and C connected to the selection input S2,S1, and So, respectively The data inputs lo through l7 are as follows: a) 11=12-I,-0;1,-1,-1,1,-14-Dand-I,-D’ Determine the Boolean function that the multiplexer implements Show transcribed image text

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 4 Points Devise Command Line Sequence Display Extensions Files Current Directory Along Q26895546

13. (4 points) Devise a command line sequence to display the extensions of all files in the current directory along with a count of each extension. You may not use temporary files, you may not use variables, and you may not use the>operation.13. (4 points) Devise a command line sequence to display the extensions of all files in the current directory along with a count of each extension. You may not use temporary files, you may not use variables, and you may not use the>operation. Show transcribed image text 13. (4 points) Devise a command line sequence to display the extensions of all files in the current directory along with a count of each extension. You may not use temporary files, you may not use variables, and you may not use the>operation.

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 9 3 3 Points Problem 815 P46 First Read Problem Description Discusses Possible Framewor Q28621238

13. [9-3 *3 points] (From Problem 8.15, p.46) First, read the problem description; it discusses a possible framework for determining structural equality when you include records, pointers, and recursive types. Now consider the following algorithm for determining structural equality relationships within a set of types. . Define two types to be equivalent at level 0 if (a) Theyre the same primitive type (int, double, etc.), (b) Or theyre both record types with the same sequences of field names (regardless of the types of the fields), or (c) Or theyre both pointer types (regardless of the types of things they point to). Define two types to be equivalent at level k+1 if they are equivalent at level k and (a) If theyre both pointer types, the types they point to must be equivalent at level k or (b) If theyre both record types, then each corresponding pair of fields must be equivalent at level k. Lets allow the abbreviation for equivalent at level 0, for equivalent at level 1, etc. Then some examples: int?double; int *-o double *, and int * double * (because int-o double). The two types discussed in the problem (rewritten into C-like syntax) are type A struct { struct B *x; double y; }; type Bstruct f struct A *double y; ; (a) Using the algorithm described above, are types A and B? Are they 1? (b) Given a set of types, how many levels do you have to use to determine equivalence of an arbitrary pair of types from the set? Do you think this algorithm meets the criteria given in the problem? Briefly explain. (c)

13. [9-3 *3 points] (From Problem 8.15, p.46) First, read the problem description; it discusses a possible framework for determining structural equality when you include records, pointers, and recursive types. Now consider the following algorithm for determining structural equality relationships within a set of types. . Define two types to be equivalent at level 0 if (a) They’re the same primitive type (int, double, etc.), (b) Or they’re both record types with the same sequences of field names (regardless of the types of the fields), or (c) Or they’re both pointer types (regardless of the types of things they point to). Define two types to be equivalent at level k+1 if they are equivalent at level k and (a) If they’re both pointer types, the types they point to must be equivalent at level k or (b) If they’re both record types, then each corresponding pair of fields must be equivalent at level k. Let’s allow the abbreviation for “equivalent at level 0”, for “equivalent at level 1”, etc. Then some examples: int?double; int *-o double *, and int * double * (because int-o double). The two types discussed in the problem (rewritten into C-like syntax) are type A struct { struct B *x; double y; }; type Bstruct f struct A *double y; ; (a) Using the algorithm described above, are types A and B? Are they 1? (b) Given a set of types, how many levels do you have to use to determine equivalence of an arbitrary pair of types from the set? Do you think this algorithm meets the criteria given in the problem? Briefly explain. (c) Show transcribed image text

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 914 12 Ao 0 Mechanism Derive Expression 612 13 Similar Freudenstein Equation 14 B Using Q25301358

13 914 12 Ao 0 For that mechanism a) Derive an expression between 612 & Θ13 similar to Freudenstein equation for & Θ14 b) Using the equations obtained in part a give a closed form solution of θ13 for independent position variable, θ12 c) Using the following dimensions, draw path of C in Cartesian coordinates for input variable θ12 between 45° and 100°. (C is the midpoint of the link AB) Note that you may use Matlab, Excel or other software for the plot. . x & y scales of the plot must be the same. Attach the script of the code at the end ofyour solution A,Bo-ao = 10 cm |A,B|=b2 = 12.5 cm

13 914 12 Ao 0 For that mechanism a) Derive an expression between 612 & Θ13 similar to Freudenstein equation for & Θ14 b) Using the equations obtained in part a give a closed form solution of θ13 for independent position variable, θ12 c) Using the following dimensions, draw path of C in Cartesian coordinates for input variable θ12 between 45° and 100°. (C is the midpoint of the link AB) Note that you may use Matlab, Excel or other software for the plot. . x & y scales of the plot must be the same. Attach the script of the code at the end ofyour solution A,Bo-ao = 10 cm |A,B|=b2 = 12.5 cm Show transcribed image text 13 914 12 Ao 0 For that mechanism a) Derive an expression between 612 & Θ13 similar to Freudenstein equation for & Θ14 b) Using the equations obtained in part a give a closed form solution of θ13 for independent position variable, θ12 c) Using the following dimensions, draw path of C in Cartesian coordinates for input variable θ12 between 45° and 100°. (C is the midpoint of the link AB) Note that you may use Matlab, Excel or other software for the plot. . x & y scales of the plot must be the same. Attach the script of the code at the end ofyour solution A,Bo-ao = 10 cm |A,B|=b2 = 12.5 cm

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 5 Marks Output Following Matlab Code Fragment 23 9 17 1 1 3 23 9 7 1 1 3 J Else 1 Ii J Q24592024

(13) (5 marks) What is the output of the following MATLAB code fragment: A= [23, 9, 17); for i 1:1:3 ト[23 9-7] for = 1:1:3 j if else 1) II (j=-3) (j disp (A (i)) - disp (A (j)) end end end(13) (5 marks) What is the output of the following MATLAB code fragment: A= [23, 9, 17); for i ” 1:1:3 ト”[23 9-7] for = 1:1:3 j if else 1) II (j=-3) (j disp (A (i)) – disp (A (j)) end end end Show transcribed image text

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 4 Show Result Three Successive Deletemin Operations Prior Heap 14 4 Average Complexitie Q24708489

13. [4] Now show the result of three successive deleteMin operations from the prior heap: 14. [4] What are the average complexities and the stability of these sorting algorithms: Algorithrm Average complexit)y Stable (yes/no)? Bubble Sort Insertion Sort Heap sort Merge Sort Radix sort Quicksort 15. [2] What are the key differences between Mergesort and Quicksort? How does this influence why languages choose one over the other?

13. [4] Now show the result of three successive deleteMin operations from the prior heap: 14. [4] What are the average complexities and the stability of these sorting algorithms: Algorithrm Average complexit)y Stable (yes/no)? Bubble Sort Insertion Sort Heap sort Merge Sort Radix sort Quicksort 15. [2] What are the key differences between Mergesort and Quicksort? How does this influence why languages choose one over the other? Show transcribed image text 13. [4] Now show the result of three successive deleteMin operations from the prior heap: 14. [4] What are the average complexities and the stability of these sorting algorithms: Algorithrm Average complexit)y Stable (yes/no)? Bubble Sort Insertion Sort Heap sort Merge Sort Radix sort Quicksort 15. [2] What are the key differences between Mergesort and Quicksort? How does this influence why languages choose one over the other?

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 Arc Welding Electric Energy Converted Sound Ener Solar Energy Dheat Energy Q28206218

13. In arc welding the electric energy is converted into sound ener solar energy dheat energy13. In arc welding the electric energy is converted into sound ener solar energy dheat energy Show transcribed image text

Expert Answer


Attached . . .

READ MORE
Coursehelp
QUESTION : No Comments

(Solved) : 13 2 Marks Describe Five English Sentences Procedure Determining Whether Given Integer X S Q29918968

1.3 [2 marks] Describe in no more than five English sentences the procedure of determining whether a given integer x is in a sorted array A of n integers using the divide and conquer strategy.

1.3 [2 marks] Describe in no more than five English sentences the procedure of determining whether a given integer x is in a sorted array A of n integers using the divide and conquer strategy. Show transcribed image text 1.3 [2 marks] Describe in no more than five English sentences the procedure of determining whether a given integer x is in a sorted array A of n integers using the divide and conquer strategy.

Expert Answer


Attached . . .

READ MORE
1 2 3 41,416