Fill Declaration Type K Int 5 K 5 Q43901012
Fill in the declaration for the type of k.
int i = 5;__ k = i == 5;
Expert Answer
Answer to Fill in the declaration for the type of k. int i = 5; __ k = i == 5;…
Fill Declaration Type K Int 5 K 5 Tried Int Wrong Asked Teacher Gave Response Syntax Decla Q43905047
Fill in the declaration for the type of k.
int i = 5;__ k = i == 5;
I have tried int which is wrong. I asked my teacher and he gavethis response.
The syntax of a declaration is <type> <name><optional initialization>; Here are some things to consider:List the types we’ve encountered so far. int is one, there areothers.The = after the “k” indicates that the optionalinitialization is present, which will work like an assignment. Whatare the two steps to an assignment? In this case, what does thefirst step yield, and what type is that?
Expert Answer
Answer to Fill in the declaration for the type of k. int i = 5; __ k = i == 5; I have tried int which is wrong. I asked my teacher…
Fill Matlab Script File Thank Q43888287
Fill in the MATLAB Script file. Thank you
The System: Consider the road train system shown below. v2(t) vi(t) | X(t) Hmmi → m2 mi → Fr(t) 612 O b2 The system can be modelled with the states: 21 = vi Z2 = V2 z3 = x(t) – 10 For this example, we will treat the input Fy(t) = 0. There is a MATLAB function which contains the state-space model of the system attached to this example. You cannot access this function, but it has following form: function zdot = ssmodel(T,Z) m1 = 5; %[kg] m2 = 10; %[kg] C = 1; % (m/N] b1 = 1; % [N/m]; b2 = 1; $[N/m]; b12 = 3; %[N/m]; % Build state-space equations zdot = NaN(3,1); zdot(1) = (-51-b12)/m1*Z(1) +b12/m1*Z(2)-1/m1/C*Z(3); zdot(2) = (b12)/m2*Z(1)+(-b12-62)/m2*2(2)+1/m2/c*Z(3); zdot(3) = 2(1)-2(2); end This is a common problem — someone else has developed a model for you (which is stored in the function ssmodel) and you need to use it to do some analysis. Your Task: 1) Simulate, using ODE45, this system for the following initial conditions: • Mass m, starts with a velocity of v,(0) = 2 m/s. • Mass m2 starts from rest v2(0) = 0 m/s. • The distance between the masses is initially equal to the natural length of the spring x(0) = lo Store your initial conditions in the vector ZO Simulate the system for 40 seconds total. Allow ODE45 to select the timesteps. Define your simulation time in the vector TSPAN 2) Extract the results from your output and store them as follows: • Store zı(1) in a vector called z1 • Store zz(1) in a vector called z2 • Store zz(t) in a vector called 23 • Store the simuation time , in a vector called t Script e Reset D2 15 % plots 16 f=figure(1); 17 s1=subplot(1,3,1); 18 % Plot z1 vs time 19 plot(t,z1) 20 % Now add axis labels, units, etc. 25 52=subplot(1,3,2); 26 % Plot 22 vs time % Now add axis labels, units, etc. 33 S3=subplot(1,3,3); Show transcribed image text The System: Consider the road train system shown below. v2(t) vi(t) | X(t) Hmmi → m2 mi → Fr(t) 612 O b2 The system can be modelled with the states: 21 = vi Z2 = V2 z3 = x(t) – 10 For this example, we will treat the input Fy(t) = 0.
There is a MATLAB function which contains the state-space model of the system attached to this example. You cannot access this function, but it has following form: function zdot = ssmodel(T,Z) m1 = 5; %[kg] m2 = 10; %[kg] C = 1; % (m/N] b1 = 1; % [N/m]; b2 = 1; $[N/m]; b12 = 3; %[N/m]; % Build state-space equations zdot = NaN(3,1); zdot(1) = (-51-b12)/m1*Z(1) +b12/m1*Z(2)-1/m1/C*Z(3); zdot(2) = (b12)/m2*Z(1)+(-b12-62)/m2*2(2)+1/m2/c*Z(3); zdot(3) = 2(1)-2(2); end This is a common problem — someone else has developed a model for you (which is stored in the function ssmodel) and you need to use it to do some analysis. Your Task: 1) Simulate, using ODE45, this system for the following initial conditions: • Mass m, starts with a velocity of v,(0) = 2 m/s. • Mass m2 starts from rest v2(0) = 0 m/s. • The distance between the masses is initially equal to the natural length of the spring x(0) = lo Store your initial conditions in the vector ZO Simulate the system for 40 seconds total. Allow ODE45 to select the timesteps. Define your simulation time in the vector TSPAN 2) Extract the results from your output and store them as follows: • Store zı(1) in a vector called z1 • Store zz(1) in a vector called z2 • Store zz(t) in a vector called 23 • Store the simuation time , in a vector called t
Script e Reset D2 15 % plots 16 f=figure(1); 17 s1=subplot(1,3,1); 18 % Plot z1 vs time 19 plot(t,z1) 20 % Now add axis labels, units, etc. 25 52=subplot(1,3,2); 26 % Plot 22 vs time % Now add axis labels, units, etc. 33 S3=subplot(1,3,3);
Expert Answer
Answer to The System: Consider the road train system shown below. v2(t) vi(t) | X(t) Hmmi → m2 mi → Fr(t) 612 O b2 The system …
Fill Missing Values Tables Perform Program Fetch Execute Cycles Following Initial Memory P Q43884066
Fill out the missing values in the tables. Perform programfetch/execute cycles for the following initial memory and programstates.
Memory 3301 CPU registers Memory CPU registers 300 300 PC 300 PC AC 301 4941 AC 301 302 1940 IR 302 IR 940 0004 940 0005 941 941 Step 1 Step 2 Memory CPU registers CPU registers Memory PC 300 PC 300 AC 301 AC 301 IR 302 IR 302 940 940 941 941 Step 4 Step 3 CPU registers Memory CPU registers Memory PC 300 PC 300 AC AC 301 301 IR 302 IR 302 940 940 941 941 Step 6 Step 5 CPU registers Memory CPU registers Memory PC 300 PC 300 AC AC 301 301 IR 302 IR 302 … 940 940 941 941 Step 8 Step 7 Problem Set 1 Problem 4: Execute stage Fetch stage १ In the following problem sets, we will use this expanded set of list of opcodes for our hypothetical machine: 0001 Load AC from memory 0010 = Store AC to memory 0011 Jump to address 0100 Subtract memory from AC (result in AC) 0101 Add to AC from memory (result in AC) Perform program fetch/execute cycles for the following initial memory and program states. NOTE: one of the problems uses the Jump to address instruction to implement a loop. You do not need to simulate more than the 4 fetch/execute cycles for this problem, even though the program in principle would execute forever. Show transcribed image text Memory 3301 CPU registers Memory CPU registers 300 300 PC 300 PC AC 301 4941 AC 301 302 1940 IR 302 IR 940 0004 940 0005 941 941 Step 1 Step 2 Memory CPU registers CPU registers Memory PC 300 PC 300 AC 301 AC 301 IR 302 IR 302 940 940 941 941 Step 4 Step 3 CPU registers Memory CPU registers Memory PC 300 PC 300 AC AC 301 301 IR 302 IR 302 940 940 941 941 Step 6 Step 5 CPU registers Memory CPU registers Memory PC 300 PC 300 AC AC 301 301 IR 302 IR 302 … 940 940 941 941 Step 8 Step 7 Problem Set 1 Problem 4: Execute stage Fetch stage १
In the following problem sets, we will use this expanded set of list of opcodes for our hypothetical machine: 0001 Load AC from memory 0010 = Store AC to memory 0011 Jump to address 0100 Subtract memory from AC (result in AC) 0101 Add to AC from memory (result in AC) Perform program fetch/execute cycles for the following initial memory and program states. NOTE: one of the problems uses the Jump to address instruction to implement a loop. You do not need to simulate more than the 4 fetch/execute cycles for this problem, even though the program in principle would execute forever.
Expert Answer
Answer to Fill out the missing values in the tables. Perform program fetch/execute cycles for the following initial memory and pro…
Fin 91 N Fe N O G N F N Fa N 0 G N Gi N Q43827677
Big oh proof
Assume that
Prove that
fin) is (91(n)) and fe(n) is o g(n)). f (n) + fa(n) is 0 g (n) + gi(n)) Show transcribed image text fin) is (91(n)) and fe(n) is o g(n)).
f (n) + fa(n) is 0 g (n) + gi(n))
Expert Answer
Answer to fin) is (91(n)) and fe(n) is o g(n)). f (n) + fa(n) is 0 g (n) + gi(n))…
Final Application Paper Purpose Analyze Interpersonal Interaction Allow Apply Course Conce Q43878167
this class is called Language, Thought, Behavior.
Final Application Paper Purpose: To analyze an interpersonal interaction that will allow you to apply course concepts and demonstrate understanding of course material. To connect personal responses and experiences to course readings and other materials. The interpersonal interaction should be relevant to one or more of your social identity markers and must be analyzed using theories and/or ideologies discussed in the course. For example, you might focus on a particular experience at work, in which your age and race played a significant role in how you were treated. You could use co- cultural theory and ageism to help understand your experience. Grading criteria: Your paper will be graded on the degree to which you addresses the following: Self-disclosure: Openly examines your own experiences as they relate to the topic, to illustrate points you are making. Demonstrates an open, non-defensive ability to self-appraise, discussing both growth and frustrations as related to learning. Risks asking probing questions about self and seeks to answer these. Praxis orientation: Specifies what you are doing differently, or what you could do differently as a result of your introspection. Explores anticipated and/or actual consequences (positive or negative). How are you thinking/behaving/feeling differently as a result of the course? Connection to outside experiences: Synthesizes thoughtfully selected aspects of experiences related to the topic. Makes clear connections between what is learned from outside experiences and the topic. Connection to course material (and if necessary other material): Synthesizes thoughtfully selected aspects of readings related to the topic. Makes clear connections between what is learned from readings and the topic. Demonstrates further analysis and insight resulting from what you have learned from readings. It might be necessary to do additional research on your chosen theory/ideology, etc. Connection to class discussions and course goals: Synthesizes, analyzes and evaluates selected aspects of ideas or issues from class discussions and activities as they relate to the topic. Show transcribed image text Final Application Paper Purpose: To analyze an interpersonal interaction that will allow you to apply course concepts and demonstrate understanding of course material. To connect personal responses and experiences to course readings and other materials. The interpersonal interaction should be relevant to one or more of your social identity markers and must be analyzed using theories and/or ideologies discussed in the course. For example, you might focus on a particular experience at work, in which your age and race played a significant role in how you were treated. You could use co- cultural theory and ageism to help understand your experience. Grading criteria: Your paper will be graded on the degree to which you addresses the following: Self-disclosure: Openly examines your own experiences as they relate to the topic, to illustrate points you are making. Demonstrates an open, non-defensive ability to self-appraise, discussing both growth and frustrations as related to learning. Risks asking probing questions about self and seeks to answer these. Praxis orientation: Specifies what you are doing differently, or what you could do differently as a result of your introspection. Explores anticipated and/or actual consequences (positive or negative). How are you thinking/behaving/feeling differently as a result of the course? Connection to outside experiences: Synthesizes thoughtfully selected aspects of experiences related to the topic. Makes clear connections between what is learned from outside experiences and the topic. Connection to course material (and if necessary other material): Synthesizes thoughtfully selected aspects of readings related to the topic. Makes clear connections between what is learned from readings and the topic. Demonstrates further analysis and insight resulting from what you have learned from readings. It might be necessary to do additional research on your chosen theory/ideology, etc. Connection to class discussions and course goals: Synthesizes, analyzes and evaluates selected aspects of ideas or issues from class discussions and activities as they relate to the topic.
Expert Answer
Answer to Final Application Paper Purpose: To analyze an interpersonal interaction that will allow you to apply course concepts an…
Final Challenge Create Binary File Using Streams Contains N Blocks Equal Fixed Size Fixed Q43861000
For this problem, using the followingtemplate
For our final challenge, you will create a binary file (using streams) that contains N blocks of an equal (fixed) size. Each fixed- sized block will contain characters of a given value. No two blocks will contain the same character. You might mentally visualize the block sequence like this: AAAAAA BBBBBB CCCCC DDDDDD (etc) Opening a stream in “binary” mode is done using settings, which have already been set up for you on the BinaryStreamwriter class. Your job will be to write blocks of data, filled with a given character, into the binary stream. Once again, your project contains a good start on the code necessary to do this work. Just look for comments in the code that indicate where you need to add code. #include “BinaryStreamWriter.hpp” namespace A { BinaryStreamWriter::BinaryStreamWriter(const char* aPath, const char* aFilename) { char thePath[512]; sprintf (thePath, “%s/%s”. aFilename); aPath, //STUDENT: open your output stream in binary mode… int BinarystreamWriter: :run (int aBlockCount, size t aBlockSize) { //iterate for 1..aBlockCount //create a buffer of given size (aBlockSize) //fill the buffer with a unique char from alphabet.. //write each block sequentially to binary stream… return 0; #ifndef BinaryStreamWriter_hpp #define BinaryStreamWriter_hpp #include <stdio.h> #include <fstream> Enamespace A { class BinaryStreamWriter { public: BinaryStreamWriter(const char* aPath, const char* aFilename); int run (int aBlockCount, size t aBlockSize=32); protected: //STUDENT: declare your binary stream here… } ; #endif /* BinaryStreamWriter_hpp * / Show transcribed image text For our final challenge, you will create a binary file (using streams) that contains N blocks of an equal (fixed) size. Each fixed- sized block will contain characters of a given value. No two blocks will contain the same character. You might mentally visualize the block sequence like this: AAAAAA BBBBBB CCCCC DDDDDD (etc) Opening a stream in “binary” mode is done using settings, which have already been set up for you on the BinaryStreamwriter class. Your job will be to write blocks of data, filled with a given character, into the binary stream. Once again, your project contains a good start on the code necessary to do this work. Just look for comments in the code that indicate where you need to add code.
#include “BinaryStreamWriter.hpp” namespace A { BinaryStreamWriter::BinaryStreamWriter(const char* aPath, const char* aFilename) { char thePath[512]; sprintf (thePath, “%s/%s”. aFilename); aPath, //STUDENT: open your output stream in binary mode… int BinarystreamWriter: :run (int aBlockCount, size t aBlockSize) { //iterate for 1..aBlockCount //create a buffer of given size (aBlockSize) //fill the buffer with a unique char from alphabet.. //write each block sequentially to binary stream… return 0;
#ifndef BinaryStreamWriter_hpp #define BinaryStreamWriter_hpp #include #include Enamespace A { class BinaryStreamWriter { public: BinaryStreamWriter(const char* aPath, const char* aFilename); int run (int aBlockCount, size t aBlockSize=32); protected: //STUDENT: declare your binary stream here… } ; #endif /* BinaryStreamWriter_hpp * /
Expert Answer
Answer to For our final challenge, you will create a binary file (using streams) that contains N blocks of an equal (fixed) size. …
Final Project Must Javafx Class Extends Application Abstract Base Class Two Subclasses Ext Q43797040
Your final project must have:
- A JavaFX class that extends Application
- Abstract base class and two subclasses that extend the abstractclass
- An unrelated “utility” class that is used by the classes above(e.g. a Dice class)
- GUI to build (set attributes of) the base classes with theability to alter and change the setup. If you use color, orsimilar, you MUST use an object (NOT TEXT)
- The following Interfaces: Serializable, Comparable
- A class that throws an exception, and another that has atry/catch/finally block that uses that exception
- a Menu that at minimum allows the user to save a *BINARY* fileand open an existing file that stored the status objects
- JavaDocs & UMLs for each class.
Project 1: Simple RPG battle game In this project you are going to create a simple battle game. You will have two types of opponents: Hydrons and Zexors. Hydrons and Zexors extend from the abstract Monster class. Create two classes: one for Hydrons and one for Zexors. Create a DiceRoll class. The attributes of the classes are as follows: Hydrons: have color, height, weight, health (starts at 25), damage potential (0-10, scaled by health), attack type, number of battles won, number of battles lost, name, and home planet. Hydrons are Triangles. Zexors: have color, height, weight, health (starts at 25), damage potential (0-10, scaled by health), attack type, number of battles won, number of battles lost, name, and species. Zexors are Circles. DiceRoll: number of sides The methods are up to you. How the health changes by battle loss is up to you but must be clearly documented Setup: The user is asked to create 3 Hydrons and 3 Zexors, and determines how many sides to the dice. Color for each monster is set via user input (NOT “RED” but rather RBG values either input via textbox or via slider) The program randomly chooses a Hydron and pits it against a randomly chosen Zexor. Each battle is determined by the a dice roll – each Hydron and Zexor rolls a single die. The higher of the dice rolls wins the battle. Damage is attributed to the loser, which also affects the damage potential of the loser. If a Hydron or Zexor does not engage in a battle, then their health increases by 1 to a maximum of 25. Appropriate information should be printed at the end of each battle round for all 6 creatures. As a monster loses health either its color or its size should decrease (or both) Battle results must be written to a file. There should be a menu to save and to load a game. Something must throw an exception that is caught and handled elsewhere. For example: Battle 1: Hydron Fred (damage potential 8) battles ZexorSally (damage potential 6). They are both at full health and roll a 7 sided die. Zexor Sally rolls a 4 and Hydron Fred rolls a 1. Zexor Sally wins, HydronFred has health of 19 (25-6); Hydron Fred’s damage potential is now reduced by 76%. Battle 2: Hydron Fred battles Zexor Thor (damage potential 9). Zexor Thor is at full health. ZexorThor rolls a 2 and HydronFred rolls 7. ZexorThor takes damage of 76% of 8. And so on until one of the 6 creatures has a health of 0. You will be graded based on the programming rubric for the course. Your analysis MUST include the algorithm for calculating health at the end of a round. This project incorporates: Loops Random numbers Classes & objects : including abstract classes and interfaces Arrays of objects Methods User Interface / User Experience Binary file i/o Menus Exceptions Show transcribed image text Project 1: Simple RPG battle game In this project you are going to create a simple battle game. You will have two types of opponents: Hydrons and Zexors. Hydrons and Zexors extend from the abstract Monster class. Create two classes: one for Hydrons and one for Zexors. Create a DiceRoll class. The attributes of the classes are as follows: Hydrons: have color, height, weight, health (starts at 25), damage potential (0-10, scaled by health), attack type, number of battles won, number of battles lost, name, and home planet. Hydrons are Triangles. Zexors: have color, height, weight, health (starts at 25), damage potential (0-10, scaled by health), attack type, number of battles won, number of battles lost, name, and species. Zexors are Circles. DiceRoll: number of sides The methods are up to you. How the health changes by battle loss is up to you but must be clearly documented Setup: The user is asked to create 3 Hydrons and 3 Zexors, and determines how many sides to the dice. Color for each monster is set via user input (NOT “RED” but rather RBG values either input via textbox or via slider) The program randomly chooses a Hydron and pits it against a randomly chosen Zexor. Each battle is determined by the a dice roll – each Hydron and Zexor rolls a single die. The higher of the dice rolls wins the battle. Damage is attributed to the loser, which also affects the damage potential of the loser. If a Hydron or Zexor does not engage in a battle, then their health increases by 1 to a maximum of 25. Appropriate information should be printed at the end of each battle round for all 6 creatures. As a monster loses health either its color or its size should decrease (or both) Battle results must be written to a file. There should be a menu to save and to load a game. Something must throw an exception that is caught and handled elsewhere. For example: Battle 1: Hydron Fred (damage potential 8) battles ZexorSally (damage potential 6). They are both at full health and roll a 7 sided die. Zexor Sally rolls a 4 and Hydron Fred rolls a 1. Zexor Sally wins, HydronFred has health of 19 (25-6); Hydron Fred’s damage potential is now reduced by 76%. Battle 2: Hydron Fred battles Zexor Thor (damage potential 9). Zexor Thor is at full health. ZexorThor rolls a 2 and HydronFred rolls 7. ZexorThor takes damage of 76% of 8.
And so on until one of the 6 creatures has a health of 0. You will be graded based on the programming rubric for the course. Your analysis MUST include the algorithm for calculating health at the end of a round. This project incorporates: Loops Random numbers Classes & objects : including abstract classes and interfaces Arrays of objects Methods User Interface / User Experience Binary file i/o Menus Exceptions
Expert Answer
Answer to Your final project must have: A JavaFX class that extends Application Abstract base class and two subclasses that extend…
Final Task Son Create 2d Array Gr 6 Range 20 50 Display Content Array Use Excel Cells Cre Q43889150
Progrraming languageFinal Task – Son Create 2D Array (Gr 6) with the range of (-20 to 50) and display the content of array (use Excel cells). And create and display one-dimensional array! that consists of the average value of each intial oarray’s row . Create flowchat of this the – hm. Show transcribed image text Final Task – Son Create 2D Array (Gr 6) with the range of (-20 to 50) and display the content of array (use Excel cells). And create and display one-dimensional array! that consists of the average value of each intial oarray’s row . Create flowchat of this the – hm.
Expert Answer
Answer to Final Task – Son Create 2D Array (Gr 6) with the range of (-20 to 50) and display the content of array (use Excel cells)…
Find 8 Bit 2 S Complementary Binary Representation Decimal Number 87 Please Need Clear Ans Q43779337
Find the 8-bit 2’s complementary binary representation for thedecimal number −87.
please i need a clear answer,and full answer
this the second time i send it,the first one was not clear.
i could not understand the handwriting
Expert Answer
Answer to Find the 8-bit 2’s complementary binary representation for the decimal number −87. please i need a clear answer,and …