Temperature Profile Plate Dimensions X E 1 8 Y E 7 10 Illustrated Figure Temperature Prof Q43810122(1)

The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. The temQ2c In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with th

P% Q2c % Leave any lines of MATLAB code that are already in this file % DO NOT clear, close or clc inside this script % Do noPLEASE HELP ME WITH Q2C. THANKYOU

The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. The temperature profile on the plate is described by: T(x, y) = y sin(x) – x cos(y) where T represents the temperature. The average temperature of the plate can be calculated as: 8″ T(х, у) dxdy 10 Taverage where A represents the total surface area of the plate. 20 10 – -10 – -20 10 -5 -10 -2 Q2a In the comp simp13 vector.m file, complete the function file for the Composite Simpson’s 1/3 rule which integrates the vector inputs. Q2b In the Q2b.m file, create a 3-by-1 subplot plot in figure(4)². In each subplot, plot the temperature of the plate along y = 2 from x between -1 to 8 (inclusive) as a red line of thickness 2, using 100 equally spaced points. Additionally, fit the (x,T) data using polynomials (see below) using a blue line. Turn the grid on and include the polynomial degree in the title of each subplot. • Top subplot: polynomial degree 3 Middle subplot: polynomial degree 5 Bottom subplot: polynomial degree 7 *You should have four figure windows by the end of this task. Temperature Q2c In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with the minimum number of points required in each direction (x and y). Continue to increase the number of points until the approximated volume achieves an accuracy of 8 decimal places (DP) matching the temperature value obtained using MATLAB’s integral2() function. Use fprintf to print the number of points, the approximated average temperature, MATLAB’S average temperature value, and the error, but only when the approximated average temperature has improved by at least a decimal place. The error is taken to be the absolute difference between the approximated average temperature and the MATLAB’s integral2() value. An example of this is shown below, with the decimal places bolded and underlined for clarity (you do not need to bold and underline the values in your MATLAB answers). DP temp_MATLAB pts temp_approx error х X.XXXXXXXXX х.ХXXXXXXXX 0.0XXXXXXXX 0.00XXXXXXX 0.00ӨХXXXXX 0.0000XXXXX х X.XXXXXXXXX х.ХXXXXXXXX X.XXXXXXXXX х X.XXXXXXXXX 3 х. XXXXXXXXX х.ХXXXXXXXX 4 Hint: Start by evaluating the inner integral along the x dimension for each value of y. The resulting values can then be integrated along the y dimension. Hint: Look at the result of log10(error) to help determine the number of zeros in the error (i.e. DP). *You should still have four figure windows by the end of this task. P% Q2c % Leave any lines of MATLAB code that are already in this file % DO NOT clear, close or clc inside this script % Do not forget good programming practices % Name : % ID % Date Modified : fprintf(‘n Q2c nn’) %% code starts here Show transcribed image text The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. The temperature profile on the plate is described by: T(x, y) = y sin(x) – x cos(y) where T represents the temperature. The average temperature of the plate can be calculated as: 8″ T(х, у) dxdy 10 Taverage where A represents the total surface area of the plate. 20 10 – -10 – -20 10 -5 -10 -2 Q2a In the comp simp13 vector.m file, complete the function file for the Composite Simpson’s 1/3 rule which integrates the vector inputs. Q2b In the Q2b.m file, create a 3-by-1 subplot plot in figure(4)². In each subplot, plot the temperature of the plate along y = 2 from x between -1 to 8 (inclusive) as a red line of thickness 2, using 100 equally spaced points. Additionally, fit the (x,T) data using polynomials (see below) using a blue line. Turn the grid on and include the polynomial degree in the title of each subplot. • Top subplot: polynomial degree 3 Middle subplot: polynomial degree 5 Bottom subplot: polynomial degree 7 *You should have four figure windows by the end of this task. Temperature
Q2c In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with the minimum number of points required in each direction (x and y). Continue to increase the number of points until the approximated volume achieves an accuracy of 8 decimal places (DP) matching the temperature value obtained using MATLAB’s integral2() function. Use fprintf to print the number of points, the approximated average temperature, MATLAB’S average temperature value, and the error, but only when the approximated average temperature has improved by at least a decimal place. The error is taken to be the absolute difference between the approximated average temperature and the MATLAB’s integral2() value. An example of this is shown below, with the decimal places bolded and underlined for clarity (you do not need to bold and underline the values in your MATLAB answers). DP temp_MATLAB pts temp_approx error х X.XXXXXXXXX х.ХXXXXXXXX 0.0XXXXXXXX 0.00XXXXXXX 0.00ӨХXXXXX 0.0000XXXXX х X.XXXXXXXXX х.ХXXXXXXXX X.XXXXXXXXX х X.XXXXXXXXX 3 х. XXXXXXXXX х.ХXXXXXXXX 4 Hint: Start by evaluating the inner integral along the x dimension for each value of y. The resulting values can then be integrated along the y dimension. Hint: Look at the result of log10(error) to help determine the number of zeros in the error (i.e. DP). *You should still have four figure windows by the end of this task.
P% Q2c % Leave any lines of MATLAB code that are already in this file % DO NOT clear, close or clc inside this script % Do not forget good programming practices % Name : % ID % Date Modified : fprintf(‘n Q2c nn’) %% code starts here

Expert Answer


Answer to The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. Th…

Temperature Profile Plate Dimensions X E 1 8 Y E 7 10 Illustrated Figure Temperature Prof Q43810122

The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. The temQ2c In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with th

P% Q2c % Leave any lines of MATLAB code that are already in this file % DO NOT clear, close or clc inside this script % Do noPLEASE HELP ME WITH Q2C. THANKYOU

The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. The temperature profile on the plate is described by: T(x, y) = y sin(x) – x cos(y) where T represents the temperature. The average temperature of the plate can be calculated as: 8″ T(х, у) dxdy 10 Taverage where A represents the total surface area of the plate. 20 10 – -10 – -20 10 -5 -10 -2 Q2a In the comp simp13 vector.m file, complete the function file for the Composite Simpson’s 1/3 rule which integrates the vector inputs. Q2b In the Q2b.m file, create a 3-by-1 subplot plot in figure(4)². In each subplot, plot the temperature of the plate along y = 2 from x between -1 to 8 (inclusive) as a red line of thickness 2, using 100 equally spaced points. Additionally, fit the (x,T) data using polynomials (see below) using a blue line. Turn the grid on and include the polynomial degree in the title of each subplot. • Top subplot: polynomial degree 3 Middle subplot: polynomial degree 5 Bottom subplot: polynomial degree 7 *You should have four figure windows by the end of this task. Temperature Q2c In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with the minimum number of points required in each direction (x and y). Continue to increase the number of points until the approximated volume achieves an accuracy of 8 decimal places (DP) matching the temperature value obtained using MATLAB’s integral2() function. Use fprintf to print the number of points, the approximated average temperature, MATLAB’S average temperature value, and the error, but only when the approximated average temperature has improved by at least a decimal place. The error is taken to be the absolute difference between the approximated average temperature and the MATLAB’s integral2() value. An example of this is shown below, with the decimal places bolded and underlined for clarity (you do not need to bold and underline the values in your MATLAB answers). DP temp_MATLAB pts temp_approx error х X.XXXXXXXXX х.ХXXXXXXXX 0.0XXXXXXXX 0.00XXXXXXX 0.00ӨХXXXXX 0.0000XXXXX х X.XXXXXXXXX х.ХXXXXXXXX X.XXXXXXXXX х X.XXXXXXXXX 3 х. XXXXXXXXX х.ХXXXXXXXX 4 Hint: Start by evaluating the inner integral along the x dimension for each value of y. The resulting values can then be integrated along the y dimension. Hint: Look at the result of log10(error) to help determine the number of zeros in the error (i.e. DP). *You should still have four figure windows by the end of this task. P% Q2c % Leave any lines of MATLAB code that are already in this file % DO NOT clear, close or clc inside this script % Do not forget good programming practices % Name : % ID % Date Modified : fprintf(‘n Q2c nn’) %% code starts here Show transcribed image text The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. The temperature profile on the plate is described by: T(x, y) = y sin(x) – x cos(y) where T represents the temperature. The average temperature of the plate can be calculated as: 8″ T(х, у) dxdy 10 Taverage where A represents the total surface area of the plate. 20 10 – -10 – -20 10 -5 -10 -2 Q2a In the comp simp13 vector.m file, complete the function file for the Composite Simpson’s 1/3 rule which integrates the vector inputs. Q2b In the Q2b.m file, create a 3-by-1 subplot plot in figure(4)². In each subplot, plot the temperature of the plate along y = 2 from x between -1 to 8 (inclusive) as a red line of thickness 2, using 100 equally spaced points. Additionally, fit the (x,T) data using polynomials (see below) using a blue line. Turn the grid on and include the polynomial degree in the title of each subplot. • Top subplot: polynomial degree 3 Middle subplot: polynomial degree 5 Bottom subplot: polynomial degree 7 *You should have four figure windows by the end of this task. Temperature
Q2c In the Q2c.m file, calculate the average temperature of the plate using the comp_simp13() function written in Q2a with the minimum number of points required in each direction (x and y). Continue to increase the number of points until the approximated volume achieves an accuracy of 8 decimal places (DP) matching the temperature value obtained using MATLAB’s integral2() function. Use fprintf to print the number of points, the approximated average temperature, MATLAB’S average temperature value, and the error, but only when the approximated average temperature has improved by at least a decimal place. The error is taken to be the absolute difference between the approximated average temperature and the MATLAB’s integral2() value. An example of this is shown below, with the decimal places bolded and underlined for clarity (you do not need to bold and underline the values in your MATLAB answers). DP temp_MATLAB pts temp_approx error х X.XXXXXXXXX х.ХXXXXXXXX 0.0XXXXXXXX 0.00XXXXXXX 0.00ӨХXXXXX 0.0000XXXXX х X.XXXXXXXXX х.ХXXXXXXXX X.XXXXXXXXX х X.XXXXXXXXX 3 х. XXXXXXXXX х.ХXXXXXXXX 4 Hint: Start by evaluating the inner integral along the x dimension for each value of y. The resulting values can then be integrated along the y dimension. Hint: Look at the result of log10(error) to help determine the number of zeros in the error (i.e. DP). *You should still have four figure windows by the end of this task.
P% Q2c % Leave any lines of MATLAB code that are already in this file % DO NOT clear, close or clc inside this script % Do not forget good programming practices % Name : % ID % Date Modified : fprintf(‘n Q2c nn’) %% code starts here

Expert Answer


Answer to The temperature profile on a plate with dimensions (x E [-1,8]) and (y e [-7,10]) is illustrated in the figure below. Th…

Template 1 Javascript Occ Template Structure Template 2 Making Canvas Need Image Included Q43889394

Template 1: Javascript With OCC Template Structure

F<HTML lang=en> <HEAD> <META CHARSET=UTF-8> <TITLE>JavaScript ooc</TITLE> <script> //classes are either declared here or

GetMessage() return this.name +,+this.Number; ReduceNumber() this. Number --; console.log(The number is now: +this.Number

Template 2: Making a Canvas & How I need the image includedMethod

aa <!DOCTYPE HTML> F<HTML lang=en> <HEAD> <Title>Welcome TO JAVA SCRIPT</TITLE> </SCRIPT> <!-- main class --> <SCRIPT> cl

image you woaded first! //In order to draw the image, you wil need //to make sure hte html image has loaded first! //They wil

Using the templates provided above to demonstrate the structureneeded for the program, please do the following program inJavascript using OCC methods (Once again please structure it likethe 1st template above):

• • • • • • • You will make a simple JavaScript game that will break the canvas up into 64X64 pixel squares (you do not have

F<HTML lang=”en”> <HEAD> <META CHARSET=”UTF-8″> <TITLE>JavaScript ooc</TITLE> <script> //classes are either declared here or imported as files class Main constructor() // Any class variables must have ‘this.’ NOT var. //By default all this.name = “Main” this. Number = 100; //Functions in classes do not have the ‘function’ tag //Function in classes CAN NOT BE USED FOR CALLBACKS! GetMessage() return this.name +”, “+this.Number; ReduceNumber() TO this. Number –; console.log(“The number is now: “+this. Number); //Call backs MUST be global functions that are not part of a class. //Therefore, all controls, buttons, or widgets will have to call back to //a global function – which in turn will use the instance of main we created! function ButtonCallBack () //This will be okay as long as m has been defined //globally before we push the button. m.ReduceNumber(); </script> GetMessage() return this.name +”,”+this.Number; ReduceNumber() this. Number –; console.log(“The number is now: “+this.Number); //Call backs MUST be global functions that are not part of a class. //Therefore, all controls, buttons, or widgets will have to call back to //a global function – which in turn will use the instance of main we created! function ButtonCallBack () //This will be okay as long as m has been defined //globally before we push the button. m.ReduceNumber(); </script> IND </HEAD> <BODY> <HEADER> <H1>JavaScript classes</H1> </HEADER> <button onclick=”ButtonCallBack ()”>Reduce Number </button> <Section ID=”console” style=”border: 2px solid #000;”> LTH </section> <script> //I want to minimize the number of global variables //So I will create ONE instance of the main class //that will hold all of the program variables within it. m = new Main(); console.log (m.GetMessage()); </script> </BODY> </HTML> aa <!DOCTYPE HTML> F<HTML lang=”en”> <HEAD> <Title>”Welcome TO JAVA SCRIPT”</TITLE> </SCRIPT> <!– main class –> <SCRIPT> class Main 1- 1- constructor() 1- this.drawPictures(); drawPictures () //In order to draw the image, you wil need //to make sure hte html image has loaded first! //They will not always appear the first time due to a loading //race condition. var pic = document.getElementById(“slime”); ctx.drawImage (pic,200,0); ctx.drawImage (pic, 400, 75, 100, 100); function onclick() m.drawPictures(); </SCRIPT> </HEAD> <BODY> <HEADERX</HEADER> <H1>Canvas Tutorial</H1> <!–style=”display:none;”–> <IMG src=”img/slime.png” alt=”slime” id=”slime”/> <SECTION id=”Canvas”> <CANVAS width=640 height=480 id=”myCanvas” style=”border: 1px solid black;” onclick=”onclick();”> Your Web-Browser does not support Canvase </CANVAS> </SECTION> <!– call our JavaScript at the end so all html elements are initialized –> <SCRIPT> //This is JavaScript image you woaded first! //In order to draw the image, you wil need //to make sure hte html image has loaded first! //They will not always appear the first time due to a loading //race condition. var pic = document.getElementById(“slime”); ctx.drawImage (pic,200,0); ctx.drawImage (pic, 400,75, 100, 100); function onclick() m.drawPictures(); HILL </SCRIPT> </HEAD> <BODY> <HEADER></HEADER> <H1>Canvas Tutorial</H1> <!–style=”display:none;”–> <IMG src=”img/slime.png” alt=”slime” id=”slime”/> <SECTION id=”Canvas”> <CANVAS width=640 height=480 id=”myCanvas” style=”border: 1px solid black;” onclick=”onclick();”> Your Web-Browser does not support Canvase </CANVAS> </SECTION <!– call our JavaScript at the end so all html elements are initialized –> <SCRIPT> //This is JavaScript //This is a variable pointing at an HTML element… For this class we will allow it. //This is the JavaScript variable pointing at the canvas. var canvas = document.getElementById(“myCanvas”); //This is 2D drawing context for canvas var ctx = canvas.getContext(“20”); m = new Main();//Invoke main to start the program. </SCRIPT> BODY • • • • • • • You will make a simple JavaScript game that will break the canvas up into 64X64 pixel squares (you do not have to visualize this) You will use a 2D array to dynamically draw a simple maze consisting of bricks and trees. o The “bricks” and “trees” will be rendered through Context 2D commands. (Not a picture) There will be one player and at least three different types of monsters. The player and monsters will be (64X64 pixel) images placed on the map. The player will push 1 of four buttons moving their character in that direction one square (You may also use press key call backs if you wish). If the player runs into a monster the player will attack the monster (But not move to the square). After the player has moved all of the monsters will move, if the monster moves on the player it will attack the player (but not move to the square). Monsters and Players cannot move through trees or walls. There will be at least 2 potions on the map that will restore the player’s health if they move on to them. (The potion will then be destroyed after it is collected) If all the monsters have died then print “You Win” on the screen. If the player is killed, then you will print “Game Over”. Both the monsters and the hero will have the following properties: o HP: Health 0 MHP: Max health o ATK: Attack bonus o DEF: Defense bonus O X(X coordinate on the grid, not the pixel value) o Y (Y coordinate on the grid, not the pixel value) O PIC: The variable pointing to the HTML image for the appropriate character. Both the player and the monster will be rendered by images, they will also have a health bar next to them. (You pick the orientation). The images will be rendered on the appropriate grid based on the X and Y value. o Since both the hero and the monster use the same render function you may want to use inheritance. For combat you will follow the equation: Damage = (other, ATK-this.DEF or 1 whichever is higher)”random number 1-6. o Again this could be implemented in a parent class. You will have three monsters with varying difficulty and one hero. o I will let you decide what the attributes should be. The game should be challenging but not impossible. • . • Show transcribed image text F JavaScript ooc //classes are either declared here or imported as files class Main constructor() // Any class variables must have ‘this.’ NOT var. //By default all this.name = “Main” this. Number = 100; //Functions in classes do not have the ‘function’ tag //Function in classes CAN NOT BE USED FOR CALLBACKS! GetMessage() return this.name +”, “+this.Number; ReduceNumber() TO this. Number –; console.log(“The number is now: “+this. Number); //Call backs MUST be global functions that are not part of a class. //Therefore, all controls, buttons, or widgets will have to call back to //a global function – which in turn will use the instance of main we created! function ButtonCallBack () //This will be okay as long as m has been defined //globally before we push the button. m.ReduceNumber();
GetMessage() return this.name +”,”+this.Number; ReduceNumber() this. Number –; console.log(“The number is now: “+this.Number); //Call backs MUST be global functions that are not part of a class. //Therefore, all controls, buttons, or widgets will have to call back to //a global function – which in turn will use the instance of main we created! function ButtonCallBack () //This will be okay as long as m has been defined //globally before we push the button. m.ReduceNumber(); IND JavaScript classes Reduce Number LTH //I want to minimize the number of global variables //So I will create ONE instance of the main class //that will hold all of the program variables within it. m = new Main(); console.log (m.GetMessage());
aa F “Welcome TO JAVA SCRIPT” class Main 1- 1- constructor() 1- this.drawPictures(); drawPictures () //In order to draw the image, you wil need //to make sure hte html image has loaded first! //They will not always appear the first time due to a loading //race condition. var pic = document.getElementById(“slime”); ctx.drawImage (pic,200,0); ctx.drawImage (pic, 400, 75, 100, 100); function onclick() m.drawPictures(); //This is JavaScript
image you woaded first! //In order to draw the image, you wil need //to make sure hte html image has loaded first! //They will not always appear the first time due to a loading //race condition. var pic = document.getElementById(“slime”); ctx.drawImage (pic,200,0); ctx.drawImage (pic, 400,75, 100, 100); function onclick() m.drawPictures(); HILL Canvas Tutorial Your Web-Browser does not support Canvase

Expert Answer


Answer to Template 1: Javascript With OCC Template Structure Template 2: Making a Canvas & How I need the image included Method…

Ten Accounts Created One Website Controlled Software Code Certain Task Give Example Would Q43842365

If there are ten accounts created for one website, how can allthese be controlled from a software or a code to do a certain taskover and over again. Give an example and how you would approach asolution and what program/code you would use to control tenaccounts at once instead of manually doing it.

Expert Answer


Answer to If there are ten accounts created for one website, how can all these be controlled from a software or a code to do a cer…

Ten Traditional Action Research Ideas Web Design Front End Masters Q43896462

Ten traditional and action research ideas on web design orfront-end for masters

Expert Answer


Answer to Ten traditional and action research ideas on web design or front-end for masters …

Term Used Describe Potential Attack System Risk Impact Exposure Factor Threat Q43838371

What term is used to describe a potential attack on asystem?

risk

impact

exposure factor

threat

Expert Answer


Answer to What term is used to describe a potential attack on a system? risk impact exposure factor threat…

Terms Big Data Variety Analysis Streaming Data Travels Around Internet B Uncertainty Data Q43859314

In terms of big data, what is variety?

a.Analysis of streaming data as it travels around theinternet

b. Uncertainty of data, including biases, noise, andabnormalities

c. different forms of structured and unstructured data

d. scale of data

Expert Answer


Answer to In terms of big data, what is variety? a.Analysis of streaming data as it travels around the internet b. Uncertainty of…

Tesla Motors Decided Hire Create Vehicle Configurator Based Various Parameters Goal Determ Q43899238

Tesla Motors has decided to hire you to create a vehicleconfigurator. Based on various parameters, the goal is to determinethe purchase price of a new car.

Here is an example of a dialog for the program I am asking youto create (user input is in boldface):

Which vehicle would you like to order? 3Which kind would you like? Long RangeWhat exterior color would you like? WhiteWhich wheels would you like? 18Want leather interior? No Want Auto-Pilot? NoEnjoy your new $47990.00 White Model 3!

The following table shows the costs your program should workwith:

Tesla Vehicle CostsModel 3  Model S   Model X  Base Price – Long Range$47,990$79,990$84,990Base Price – Performance$55,990$99,990$104,990Exterior Color-Whiteno cost optionno cost optionno cost optionExterior Color-Black$500$1,000$1,000Exterior Color-Blue$1,000$1,500$1,500Exterior Color-Grey$1,000$1,500$1,500Exterior Color-Red$1,500$2,500$2,500Wheels-Regular Size18 inch – no cost option19 inch – no cost option .  20 inch – no cost option .  Wheels-Large Size19 inch – $1,50021 inch – $4,50022 inch – $5,500Leather$1,000$1,000$1,000Auto-Pilot$6,000$6,000$6,00

Here’s a few other examples to give you a sense of how it shouldwork:   

Which vehicle would you like to order? 3Which kind would you like? Long RangeWhat exterior color would you like? YellowWhich wheels would you like? 18Want leather interior? No Want Auto-Pilot? NoError – Incorrect color choice.Which vehicle would you like to order? S Which kind would you like? PerformanceWhat exterior color would you like? WhiteWhich wheels would you like? 21 Want leather interior? No Want Auto-Pilot? NoEnjoy your new $104490.00 White Model S!

Your program must collect the information for one vehicle in themanner indicated by the examples, and then write to cout exactlyone line in a format required below. Our grading tool will judgethe correctness of your program by examining your output . Thatline you write must be in one of the following seven forms; thetext must be identical to what is shown (exceptthat the italicized ccc should be the appropriate colorvalue supplied by the user and the italicized v should be thevehicle model supplied by the user:

  • If the user enters a vehicle value which is not “3” or “S” or”X”:
    Error – Incorrect model choice.
  • If the user enters a kind value which is not “Performance” or”Long Range”:
    Error – Incorrect kind choice.
  • If the user enters a color value which is not “White”, “Black”,”Blue”, “Grey” or “Red”:
    Error – Incorrect color choice.
  • If the user enters a wheel value which is not 18 or 19 for aModel 3, 19 or 21 for a Model S, or 20 or 22 for a ModelX:   
      Error – Incorrect wheel value.
  • If the user enters a leather value which is not “Yes” or”No”:
    Error – Incorrect leather choice.
  • If the user enters an autopilot value which is not “Yes” or”No”:
    Error – Incorrect autopilot choice.
  • Otherwise:
    Enjoy your new .$ ccc Model v!

The lines you write must not start with any spaces. If you arenot a good speller or typist, or if English is not your firstlanguage, be especially careful about duplicating the messagesexactly. Here are some foolish mistakes that maycause you to get no points for correctness on this project, nomatter how much time you put into it:

  • Writing any extra spaces on the output line.
  • Writing more than one line of output. Don’t, for example, add agratuitous “Thank you for using my great vehicle calculator!”
  • Writing lines to cerr instead of cout.
  • Writing lines like these:
    Enjoy your new $47990.00 White Model 3 missingexclamation
    Enjyy your new $47990.00 White Model 3! misspelling
    ENJOY YOUR NEW $47990.00 WHITE MODEL 3! wrongcapitalization
    Enjoy your new $47990.00 White Model 3 !   extraspaces
    Enjoy your new $47990 While Model 3!   incorrectnumber format

Your program must gather the model value, the kind value, thecolor value, the wheels value, the leather value and an autopilotvalue, in that specific order. However, if you detect an error inan item, you do not have to request or get the remaining items ifyou don’t want to; just be sure you write to cout the requirederror message and nothing more after that. If instead you choose togather all input first before checking for any errors, and youdetect more than one error, then write only the error message forthe first erroneous input item.

You will not write any loops in this program. This means thateach time you run the program, it handles only one vehicleconfiguration. It also means that in the case of bad input, youmust not keep prompting the user until you getsomething acceptable; our grading tool will not recognize thatyou’re doing that.

The correctness of your program must not depend on undefinedprogram behavior. Your program could not, for example, assumeanything about n’s value at the point indicated:

int main(){int n;int m = 42 * n; // n’s value is undefined

What you will turn in for this assignment is a zip filecontaining these three files and nothing more:

  1. A text file named vehicle.cpp that containsthe source code for your C++ program. Your source code should havehelpful comments that tell the purpose of the major programsegments and explain any tricky code.
  2. A file named report.doc orreport.docx (in Microsoft Word format) orreport.txt (an ordinary text file) that containsin addition your name and your IdNumber:
    1. A brief description of notable obstacles you overcame. (InProject 1, for example, some people had the problem of figuring outhow to work with more than one version of a program in VisualC++.)
    2. A list of the test data that could be used to thoroughly testyour program, along with the reason for each test. You don’t haveto include the results of the tests, but you must note which testcases your program does not handle correctly. (This could happen ifyou didn’t have time to write a complete solution, or if you ranout of time while still debugging a supposedly completesolution.)

Expert Answer


Answer to Tesla Motors has decided to hire you to create a vehicle configurator. Based on various parameters, the goal is to deter…

Test Define Struct Named Node Containing 3 Fields Int Data Int Next Int Valid Fields Must Q43810778

For this test, you should define a struct named “node”containing 3 fields:
int data
int next
int valid

*** These fields must be in the above order in the structstatement ***

Then write a function named “init” which accepts an array ofnodes and
performs the following initialization:

– for element[0], set valid=1, data=42 and next=-1
– for elements 1-99, set valid=0, data=999 and next=-99999

A prototype would be:
void init(struct node*);

Expert Answer


Answer to For this test, you should define a struct named “node” containing 3 fields: int data int next int valid *** These fields…

Test Name Fk01 8 Refer Diagram Salesperson Customers Customers Salesperson Salesperson Num Q43803304

TEST NAME: FK01 8 Refer to this diagram. Salesperson Customers Customers Salesperson Salesperson Number PK PK Customer NumberPK Salesperson Number PK Customer Numb Sales to Buys from - Name Commisson purchase - Date of hire Name Phone numbe Purchase
please explain how you got this answerTEST NAME: FK01 8 Refer to this diagram. Salesperson Customers Customers Salesperson Salesperson Number PK PK Customer Number Sales to Buys from Name Commisson purchase Date of hire Name Phone number Purchase history What kind of relationship is being shown in the given entity-relationship diagram? Many-to-many unary Question navigation PK Salesperson Number PK Customer Numb Sales to Buys from – Name Commisson purchase – Date of hire Name Phone numbe Purchase history What kind of relationship is being shown in the given entity-relationship diagram? Many-to-many unary Many-to-many binary One-to-many unary One-to-many binary Show transcribed image text TEST NAME: FK01 8 Refer to this diagram. Salesperson Customers Customers Salesperson Salesperson Number PK PK Customer Number Sales to Buys from Name Commisson purchase Date of hire Name Phone number Purchase history What kind of relationship is being shown in the given entity-relationship diagram? Many-to-many unary Question navigation
PK Salesperson Number PK Customer Numb Sales to Buys from – Name Commisson purchase – Date of hire Name Phone numbe Purchase history What kind of relationship is being shown in the given entity-relationship diagram? Many-to-many unary Many-to-many binary One-to-many unary One-to-many binary

Expert Answer


Answer to TEST NAME: FK01 8 Refer to this diagram. Salesperson Customers Customers Salesperson Salesperson Number PK PK Customer N…