## Blog Coursehelp
March 15, 2019

## (Solved) : Program Program Student Program Simulation Deck Cards Program Following 1 Ask User Enter N Q18099432

Program: In this program, the student will program a simulationof deck of cards. The program will do the following: 1. Ask theuser to enter the number of decks to shuffle 2. Shuffle a decks ofcards. No instance of a card should be repeated more times than thenumber of decks. Example: If you shuffle 4 decks, the 7 of clubsshould appear 4 times (no more no less). 3. Displays all of thecards in the shuffled decks. Displays the cards’ face values andsuit values. NOTE: Heart () – can be displayed as H, Club () –can be displayed as C, Diamond () – can be displayed as D, Spade() – can be displayed as S. Your program should contain thefollowing: 1. Symbolic constants for the number of cards per deck(52), number of face values per deck (13), and number of suits perdeck (4). 2. Array(s) for shuffled deck of cards (depending on howyou accomplish it). 3. Function to shuffle deck of cards. 4.Function to display the deck of cards. 5. All user input and outputuses cin and cout (not scanf or printf) Recommendations: If youhave one deck of cards, you have 52 cards. You can represent eachcard to have a numerical value between 0 and 51. You can userand()%(CARDS_IN_DECK*numberOfDecks) to get a random number andcheck that with previous numbers drawn. You can then use thisunique number to determine the face and suit of the card. BONUS(+5): Instead of H, C, D, and S, displays,,, and  instead.

Attached . . .

OR OR ## Questions viewed by other students

• QUESTION : (Solved) : 12 Question Explore Equivalence Function Computation Language Recognition Performed Turing Q34901576 12. In this question, we explore the equivalence between function computation and language recognition as performed by Turing machines. For simplicity, we will consider only functions from the nonnegative integers to the nonnegative inte- gers (both encoded in binary). But the ideas of these questions apply to any com- putable function. We’ll start with the following definition: Define the graph of a function fto be the set of all strings of the form [x.fx)], where x is the binary encoding of a nonnegative integer, and flx) is the binary encoding of the result of applyingfto x For example. the graph of the function succ is the set ([o, 1].[1. 101,[10,11]…) a. Describe in clear English an algorithm that, given a Turing machine M that computes f, constructs a Turing machine M’ that decides the language L that contains exactly the graph of f. b. Describe in clear English an algorithm that, given a Turing machine M that decides the language L that contains the graph of some function f.constructs a Turing machine M’ that computes f. c A function is said to be partial if it may be undefined for some arguments. If we extend the ideas of this exercise to partial functions, then we do not require that the Turing machine that computes fhalt if it is given some input x for which fix) is undefined. Then L (the graph language for f), will contain entries of the form [r.Jx)] for only those values of x for which fis defined.In that case, it may not be possible to decide L, but it will be possible to semidecide it. Do your construc- tions for parts (a) and (b) work if the function fis partial? If not, explain how you could modify them so they will work correctly. By”work”, we mearn: For part (a): Given a Turing machine that computes f) for all values on which fis defined, build a Turing machine that semidecides the language L that contains exactly the graph of f. For part (b): Given a Turing machine that semidecides the graph language of f (and thus accepts all strings of the form[x, f(x)] when f(r) is defined) build a Turing machine that computes f. Show transcribed image text

Attached . . .

• QUESTION : (Solved) : 12 Red Black Rb Trees Additional Properties Regular Binary Search Tree Rb Tree Enforce Ii Q26137493 12. Red-Black (RB) trees (i) What additional properties to those of a regular binary search tree does an RB tree enforce? (ii) Draw a diagram depicting an RB tree showing the colors of its internal and external nodes. (iii) Is the algorithm for searching a standard binary search tree the same as for an RB tree? (iv) What is the search time complexity of an RB tree? (v) Describe with the aid of diagrams the insertion operation into an RB tree explain the tri-node restructuring and when this is done in the insertion . the double-red pheobenondone in the insertion explain recoloring and when this is done in the insertion Show transcribed image text

Attached . . .

• QUESTION : (Solved) : 12 Refer Characteristic Curve Shown Use Vcc 8v Icmax 40 Ma 50 200 Ua 160 Ua 120 Ua 80 Ua 4 Q26146657 12. Refer to the characteristic curve shown. (a) Use Vcc 8V and Icmax) 40 mA 50 200 uA 160 uA 120 uA 80 uA 40 uA 0 uA and label these on the plot. Pick a Q-point & label it. (Clearly mark its Ic & VcE!!!) 40 (b) (c) Calculate the β (d) Calculate the α. (e) Draw the universal-bias circuit. (f) Calculate Ra, Rb, Rc and Re and 30 20 label these values on your circuit. (Use the approximate method.) 10 (g) Calculate IB, Ic and IE (h) Calculate the AC gain. 0 0 2 6 8 10 Vce (volts) Show transcribed image text

Attached . . .

• QUESTION : (Solved) : 12 Regard 1 Java Class Default Constructor 2 Default Constructor 3 Purposes Class Construc Q26132087 java question

12 Regard (1) All java class should have a default constructor (2) What is a default constructor? (3) What are the purposes of class constructors? (4) Why at times you need to include several constructors? ing class constructors, answer questions by choosing a proper code as listed below: , yes or no. Answer in ANS (1) Answer in ANS (2) Answer in ANS (3) Answer in ANS (4) Select answer codes for above questions and write down the answer code (A,B.C…) to ANS: Line( I) Line(2)_ Line(3) below A: Cycle one in Answer ANS (1) B: a default constructor is the constructor without parameters within the parentheses C : a default constructor is the constructor with at least one parameter within the parentheses D: constructor(s) is used to help the super class (base class) to setup initial values for instance variable(s) E: constructor(s) is used to make the designing of base class (super class) more easily F: constructor(s) is used to initialize the instance variable(s) with specific values of variety of instance variable combinations from a driver class G: constructor(s) is used to make the execution of base class (super class) more efficient during execution H: constructor(s) is used to make the execution of the driver class faster I: You need to provide all possible combination of instance variables for its initialization by a class to invoke the class via a constructor ANS (1): I JYes ANS (2): No Answer in ANS (1) 13 (I) When a default constructor is provided by Java compiler? ANS (1) Check one with x: I ] When there is no default constructor designed in the class I 1 When there is no constructor(s) in the class I J Java will provide a default constructor regardless of the situation of the clas Answer in ANS (2) (2) How many parameters shall be included in the default constructor of a class? ANS (2) check one withx: I ] At least one parameter I I ] Shall contain all instance variable initial values J No parameter should be included f nnlet nroeram named: MyFirst Applet.class Show transcribed image text