Need Help ?

Expert Answers

(Solved): c++ function1234a. Develop project for advertisement: name y...

c++ function

a. Develop project for advertisement: name your C++ program Lastname Pass9.cpp. Remember to use the same project you download1

- - -- - - - - - - - - - - - - - - - - - - - - - - - - #include <iostream> #include <iomanip> #include Game EngineV4.h usin2

1. Insert the following function prototype before the main() function. void drawMyObject(GameEngineV4 g, int x, int y, int c3

Graphics01V4.exe4

a. Develop project for advertisement: name your C++ program Lastname Pass9.cpp. Remember to use the same project you downloaded from D2L Graphics01V4. b. Using the graphics functions, draw a scene related to the stock market or the benefits of investing. The output should include a background, actor, text, and some objects. Note this is an artistic expression so perfect representation is not required. C. Create one or more objects that move across the screen. d. Create a function to draw each object from your scene. e. Each function should be passed the x and y coordinates and at least one color as argument/ parameters. f. At least one object should change color at least 3 or more times. g. Movement should be relatively smooth. h. Display a message when the program completes. i. Be creative! Do Lab9 first, as an example of developing an animation. - - -- - - - - - - - - - - - - - - - - - - - - - - - - #include <iostream> #include <iomanip> #include "Game EngineV4.h" using namespace std; int main() // instantiate graphic object Game EngineV4 g; // initialize window g.initializePanel(800,600); g.setBackground (g.CYAN); // initialize Window // color the background // animate object for (int i =0; i< 40; i++) g.setColor(g.BLUE); g.filloval((i+10)+50, 100, 100, 100); g.displayPanel(); g.displayDelay(0.25); g.setBackground(g.CYAN); // wait .25 seconds // color the background system("pause"); g.closePanel(); return 0; Hit the play arrow (green arrow) to the left of the Debug on the Toolbar. Observe the results. Complete the following modifications one at a time: 1. Insert the following function prototype before the main() function. void drawMyObject(GameEngineV4 g, int x, int y, int c); Compile and run your program to make sure it works. 2. Define the draw MyObject function after the main() function. void drawMyObject( GameEngineV4 g, int x, int y, int c) 1. Insert the following function prototype before the main() function. void drawMyObject(GameEngineV4 g, int x, int y, int c ); Compile and run your program to make sure it works. 2. Define the draw MyObject function after the main() function. void drawMyObject( GameEngineV4 g, int x, int y, int c) g.setColor(c); g.filloval((x+10)+50,7,100,100); 3. Locate and replace the following statements in the main() function's for loop. g.setColor(g.BLUE); g.filloval((i+10)+50,100,100,100); with drawMyObject( g, i, 100, g.BLUE); Graphics01V4.exe Show transcribed image text a. Develop project for advertisement: name your C++ program Lastname Pass9.cpp. Remember to use the same project you downloaded from D2L Graphics01V4. b. Using the graphics functions, draw a scene related to the stock market or the benefits of investing. The output should include a background, actor, text, and some objects. Note this is an artistic expression so perfect representation is not required. C. Create one or more objects that move across the screen. d. Create a function to draw each object from your scene. e. Each function should be passed the x and y coordinates and at least one color as argument/ parameters. f. At least one object should change color at least 3 or more times. g. Movement should be relatively smooth. h. Display a message when the program completes. i. Be creative! Do Lab9 first, as an example of developing an animation.
- - -- - - - - - - - - - - - - - - - - - - - - - - - - #include #include #include "Game EngineV4.h" using namespace std; int main() // instantiate graphic object Game EngineV4 g; // initialize window g.initializePanel(800,600); g.setBackground (g.CYAN); // initialize Window // color the background // animate object for (int i =0; i

(Solved): . In the distributed spanning tree algorithm, suppose the be...

. In the distributed spanning tree algorithm, suppose the best configuration message stored by bridge B7 for its port 1 is <B

. In the distributed spanning tree algorithm, suppose the best configuration message stored by bridge B7 for its port 1 is <B5, 5, B7> at this moment, where the format of the configuration message is defined by <root bridge in belief, hop count to the root in belief, bridge that is sending this configuration message. Which one of the following configuration messages, if received by B7 from its port 1, should be considered by B7 as a better message than its current best configuration message <B5,5, B7>? O <B2, 10, B4> O <B6, 2, B8> O <B5,6, B92 O <B5, 6, B11> Show transcribed image text . In the distributed spanning tree algorithm, suppose the best configuration message stored by bridge B7 for its port 1 is at this moment, where the format of the configuration message is defined by

(Solved): System ControlState Space, Pole Placement Method, Observer D...

System Control

State Space, Pole Placement Method, Observer Design

Please answer the questions below

a. What is the observer gain L for a perfect observer? Explain. b. If the matrix A of the plant is diagonal, then B with zero

a. What is the observer gain L for a perfect observer? Explain. b. If the matrix A of the plant is diagonal, then B with zero values signifies uncontrollability. Explain why intuitively and also by math. C. If the matrix A of the plant is diagonal, then C with zero values signifies unobservability. Explain why intuitively and also by math. d. Controller canonical form of a plant is very useful in designing controllers (hence the name). Explain why. Show transcribed image text a. What is the observer gain L for a perfect observer? Explain. b. If the matrix A of the plant is diagonal, then B with zero values signifies uncontrollability. Explain why intuitively and also by math. C. If the matrix A of the plant is diagonal, then C with zero values signifies unobservability. Explain why intuitively and also by math. d. Controller canonical form of a plant is very useful in designing controllers (hence the name). Explain why.

(Solved): . ? N ? ? - è i Select the sum of Minterms for f(w, x, y, z...

. ? N ? ? - è iSelect the sum of Minterms for f(w, x, y, z). o o o o o o o o o o o o o o o o

. ? N ? ? - è i Select the sum of Minterms for f(w, x, y, z). o o o o o o o o o o o o o o o o Show transcribed image text . ? N ? ? - è i
Select the sum of Minterms for f(w, x, y, z). o o o o o o o o o o o o o o o o

(Solved): using rhapsody for C++, please provide diagrams for the foll...




using rhapsody for C++, please provide diagrams for the followingsituations
a. Products sold by Home Depot include tools and perishables as special kinds. Besides regular attributes like SKU, descriptia. Products sold by Home Depot include tools and perishables as special kinds. Besides regular attributes like SKU, description, size, and color, perishables has specific expiration dates and storage temperate, and tools have specific wattages. b. In the assembly industry, parts are used to make other parts. Sometimes, a part can comprise multiple quantities of constituent parts. c. After each treatment, either patient or clinic can file an insurance claim for the treatment. How would you use a class diagram to model the related objects? Show transcribed image text a. Products sold by Home Depot include tools and perishables as special kinds. Besides regular attributes like SKU, description, size, and color, perishables has specific expiration dates and storage temperate, and tools have specific wattages. b. In the assembly industry, parts are used to make other parts. Sometimes, a part can comprise multiple quantities of constituent parts. c. After each treatment, either patient or clinic can file an insurance claim for the treatment. How would you use a class diagram to model the related objects?

(Solved): Clanguagea. parent received the input through the command li...

a. parent received the input through the command line using: int main(int argc, char *argv[]), dont forget o use (atoi) to t

NOTE: Just for the condition of this semester, use the fix value of 7 (so, the program doesnt have to work for any input, na


Clanguagea. parent received the input through the command line using: int main(int argc, char *argv[]), don't forget o use (atoi) to transform the char 7 into the integer. b. child computes the sequence and stored the result in an array. C. parent prints the sequence The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, .... Formally, it can be expressed as: fibc = 0 fib1 = 1 fibn = fibn-1 + fibn-2 Write a multithreaded program that generates the Fibonacci series using Pthreads thread library. This program should work as follows: The user will enter on the command line the number of Fibonacci numbers that the program is to generate (* in this case 7 *). The program will then create a separate thread that will generate the Fibonacci sequence, placing the sequence in data- code (section) that is shared by the threads (an array is probably the most convenient data structure). When the thread finishes execution, the parent thread will output the sequence generated by the child thread. Because the parent thread cannot begin outputting the Fibonacci sequence until the child thread finishes, this will require having the parent thread wait for the child thread. NOTE: Just for the condition of this semester, use the fix value of 7 (so, the program doesn't have to work for any input, namely just for the number 7), in that way you can use an array of size 7 to store the Fibonacci series (child thread has to generate this sequence), so you don't need to use dynamic memory allocation Advise: 1. EASY, just declare the array where parent and child can access it. (code-data section, i.e., global array, check slides examples) 2. Don't forget to lock the critical section or share variable, namely the array 3. For thread synchronization use LOCKS Show transcribed image text a. parent received the input through the command line using: int main(int argc, char *argv[]), don't forget o use (atoi) to transform the char 7 into the integer. b. child computes the sequence and stored the result in an array. C. parent prints the sequence The Fibonacci sequence is the series of numbers 0, 1, 1, 2, 3, 5, 8, .... Formally, it can be expressed as: fibc = 0 fib1 = 1 fibn = fibn-1 + fibn-2 Write a multithreaded program that generates the Fibonacci series using Pthreads thread library. This program should work as follows: The user will enter on the command line the number of Fibonacci numbers that the program is to generate (* in this case 7 *). The program will then create a separate thread that will generate the Fibonacci sequence, placing the sequence in data- code (section) that is shared by the threads (an array is probably the most convenient data structure). When the thread finishes execution, the parent thread will output the sequence generated by the child thread. Because the parent thread cannot begin outputting the Fibonacci sequence until the child thread finishes, this will require having the parent thread wait for the child thread.
NOTE: Just for the condition of this semester, use the fix value of 7 (so, the program doesn't have to work for any input, namely just for the number 7), in that way you can use an array of size 7 to store the Fibonacci series (child thread has to generate this sequence), so you don't need to use dynamic memory allocation Advise: 1. EASY, just declare the array where parent and child can access it. (code-data section, i.e., global array, check slides examples) 2. Don't forget to lock the critical section or share variable, namely the array 3. For thread synchronization use LOCKS

(Solved):                                   ...

Add 10pt space after paragraphs = | CIS 331 HOMEWORK 5 (3) - WordPad File Home View Cut Find Calibri 11 - AA - - Copy 4ac Rep
             
             
             
             
             
                   

Add 10pt space after paragraphs = | CIS 331 HOMEWORK 5 (3) - WordPad File Home View Cut Find Calibri 11 - AA - - Copy 4ac Replace Paste BI Uabe X, X A 2 . EI SE Picture Paint Date and Insert - drawing time object Select all Clipboard Font Paragraph Insert Editing WordPad does not support all of the features of this document's format. Some content might be missing or displayed improperly. X 11.IIII........1 III III.2.IIII.3.III.4IIIII. 5.IIIIIIIIIII.7. HOMEWORK 5 Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. Router D may only handle traffic to the Internet. Use the shortest possible route. 10.0.0.2 20.0.0.1 10.000 20.0.0.0, A B C 30.0.0.0, 20.0.0.2 30.0.0.1 P 10.0.0.1 — 30.0.0.2 Internet 40.0.0.0 40.0.0.1 Router A Router B Router C Router D Network Next Hop Next Hop Next Hop Next Hop CAP 100% Show transcribed image text Add 10pt space after paragraphs = | CIS 331 HOMEWORK 5 (3) - WordPad File Home View Cut Find Calibri 11 - AA - - Copy 4ac Replace Paste BI Uabe X, X A 2 . EI SE Picture Paint Date and Insert - drawing time object Select all Clipboard Font Paragraph Insert Editing WordPad does not support all of the features of this document's format. Some content might be missing or displayed improperly. X 11.IIII........1 III III.2.IIII.3.III.4IIIII. 5.IIIIIIIIIII.7. HOMEWORK 5 Show the routing tables for routers A, B, C, and D. Make sure you account for traffic to the Internet. Router D may only handle traffic to the Internet. Use the shortest possible route. 10.0.0.2 20.0.0.1 10.000 20.0.0.0, A B C 30.0.0.0, 20.0.0.2 30.0.0.1 P 10.0.0.1 — 30.0.0.2 Internet 40.0.0.0 40.0.0.1 Router A Router B Router C Router D Network Next Hop Next Hop Next Hop Next Hop CAP 100%

(Solved): write program in phytona. resultado = seno(valor1 * valor2) ...

write program in phyton
a. resultado = seno(valor1 * valor2) b. resultado = valor(numero numero) - 1) numero-1a. resultado = seno(valor1 * valor2) b. resultado = valor(numero numero) - 1) numero-1 Show transcribed image text a. resultado = seno(valor1 * valor2) b. resultado = valor(numero numero) - 1) numero-1

(Solved): ????? ???Exercise 2: Assume the code below is executed on a ...

????? ???
Exercise 2: Assume the code below is executed on a computer with a clock rate of 2GHz. (a) How long will it take to completeExercise 2: Assume the code below is executed on a computer with a clock rate of 2GHz. (a) How long will it take to complete execution of the code if CPI=1.0? points) add Sto, Stl. S12 lw $80, 12 Sto) add $t0,$t3, S14 lw $s1, 20( Sto) sub Ss3, S80, Ss1 sub Sto, St5, St6 sw $s3, 24( Sto) sw $s3.48( Sto) (b) Now assume that add takes one clock cycle to execute, lw requires 2 clock cycles to execute, sub requires one clock cycle and sw requires 3 clock cycles to execute. 1) What is the average CPI? 2) How long will it take the code sequence to complete? 2) If computer A runs a program in 10 seconds and computer B runs the same program in 20 seconds, how much faster is A than B? Show transcribed image text Exercise 2: Assume the code below is executed on a computer with a clock rate of 2GHz. (a) How long will it take to complete execution of the code if CPI=1.0? points) add Sto, Stl. S12 lw $80, 12 Sto) add $t0,$t3, S14 lw $s1, 20( Sto) sub Ss3, S80, Ss1 sub Sto, St5, St6 sw $s3, 24( Sto) sw $s3.48( Sto) (b) Now assume that add takes one clock cycle to execute, lw requires 2 clock cycles to execute, sub requires one clock cycle and sw requires 3 clock cycles to execute. 1) What is the average CPI? 2) How long will it take the code sequence to complete? 2) If computer A runs a program in 10 seconds and computer B runs the same program in 20 seconds, how much faster is A than B?

(Solved): ????? ???Exercise 4: Based on the following code, fill in th...

????? ???
Exercise 4: Based on the following code, fill in the spaces in the table below. while (save[i] == k) i += 1; Mapping i to $s3Exercise 4: Based on the following code, fill in the spaces in the table below. while (save[i] == k) i += 1; Mapping i to $s3 and k to $55 Base of array save is $s6 Ss0 - $87 : registers 16 - 23 Sto - St7 : registers 8-15 $t8 - St 9: registers 24-25 Assembly code Address Machine code Format type 0 Loop: sll add lw bne addi i Exit: $t1,$s3, 2600000 $t1, $t1, $s 60004 $t0, ($t1) 60008 35 Sto, $85, Exit 600125 $s3, $s3, 60016 8 Loop 600202 600241 Show transcribed image text Exercise 4: Based on the following code, fill in the spaces in the table below. while (save[i] == k) i += 1; Mapping i to $s3 and k to $55 Base of array save is $s6 Ss0 - $87 : registers 16 - 23 Sto - St7 : registers 8-15 $t8 - St 9: registers 24-25 Assembly code Address Machine code Format type 0 Loop: sll add lw bne addi i Exit: $t1,$s3, 2600000 $t1, $t1, $s 60004 $t0, ($t1) 60008 35 Sto, $85, Exit 600125 $s3, $s3, 60016 8 Loop 600202 600241