Coursehelp
April 16, 2019

## (Solved) : Work Construction Firm Need Able Accurately Predict Compressive Strength Concrete Given Va Q30689271 . . .

You work for a construction firm who need to be able toaccurately predict the compressive strength of concretegiven variables including the concrete composition and itsage. You are aware that the relationship between thesedifferent components and the concrete strength is complex, howeveryou have been asked to investigate how well a simple linearregression model works for prediction. Using theprovided data given in the linkbelow (Concrete_Data.xls),develop models to predict:

1. Concrete strength from the single best indicatorvariable;

2. Concrete strength from all variables.

With the second model, determine if anyvariables are not contributing significantly to the model,and what impact removing these has on predictionperformance. Comment on the final model and itsaccuracy. You should draw on the unit content concerningcorrelation and regression toanswer this question (Provide a MATLAB code andvisualisations to justify your response.)

. . .

OR
OR

## Questions viewed by other students

• QUESTION : (Solved) : Code Well Documented High Level Comments Also Codes Include Synopsis Algorithm Used Perfor Q34283565 . . .

Your code should be well documented with high-level comments.Also, your codes include a synopsis of the algorithm you used toperform the multiplication,please. Thanks!

The code provided:

a) mul.s

.globl times
times:
mov %edi, %eax # remove these two lines before
imull %esi, %eax # you start writing your code

ret

b)main.c

#include <stdio.h>

unsigned times(unsigned, unsigned);

void main () {
unsigned a = 6;
unsigned b = 7;
printf(“The product of %u and %u is %u. “, a, b, times(a,b));
return;
}

We were unable to transcribe this imageYou will modify the subroutine in mul.s, replacing the two instructions that reside there with your solution The Specification . The register %edi will contain the argurnent a. ·The register %esi will contain the argument b. . The register %eax will carry the return value, the product of a and b. . You may use registers %rax, %rcx, %rax, %rsi, %rdi, %r8, %r9, %r10 and %r 11 as scratch registers. i.e., you may modify their values without penalty. Plan your register usage accordingly! You may not modify the values of registers %rbx, %rbp, %rsp, %r12, %r13, %r14 and %r15. You may not modify the values of any external memory locations. Show transcribed image text

. . .

• QUESTION : (Solved) : Code Want Always Execute Whether Exception Thrown Placed Block Try Catch Finally Program E Q30657048 . . .

The code you want to always execute, whether an exception isthrown or not, is placed in the ____ block.

 try catch finally if

If a program experiences an unhandled exception, the programterminates.

 True False

All exceptions inherit from the base ____ class.

 SystemException Exception ApplicationException BaseException

Run-time errors are typically easy to fix.

 True False

Using the debugger built into Visual Studio allows you to placea marker that causes the code to pause execution. This is ____.

 an event a breakpoint a watch an exception

The two types of errors are compile and run-time errors.

 True False

. . .

• QUESTION : (Solved) : Code Works Shell Doesn T Work Pico C Editor Cpp Compiler Errors Get Topdivarraycpp 81 71 M Q27656523 . . .

so my code works in shell but doesn’t work in pico c++ editor.cpp compiler

these are the errors i get:

top_div_array.cpp:81:71: missing terminating ” character
top_div_array.cpp:82:2: missing terminating ” character
top_div_array.cpp: In function `void print_result(float*,std::string*, int)’:
top_div_array.cpp:82: error: syntax error before stringconstant
gen242@cs04:~>

and this is my code:

//poonam patel
//cs 102 spring
//calculates highest divisions sales using array and prototypesfunction

//libraries
#include <iostream>
#include <string>
#include <iomanip>
using namespace std;

//function prototypes
void populate_div_sales(float[], string[], int);
int findHighest (float[], int);
void print_result(float[], string[], int);

int main()
{
int top_div_index = 0;
float div_sales[4];
string div_regions[4];

//arrays for regioons
div_regions[0] = “Northeast”;
div_regions[1] = “Southeast”;
div_regions[2] = “Northwest”;
div_regions[3] = “Southwest”;

//function
populate_div_sales(div_sales,div_regions,4);
//debug
cout<<“debug print for arraydiv_sales_array”<<endl;
for (int i=0; i<4; i++)
{
cout<<div_sales[i]<<endl;
}
top_div_index = findHighest(div_sales,4);
cout<<“debug fortop_div_index:”<<top_div_index<<endl;

print_result(div_sales, div_regions, 4);

return 0;
}
//division sales
void populate_div_sales(float f_div_sales[], stringf_div_regions[], int size)
{
float sale;
cout<<“Enter Division Sales for 4 regionsn”;
for(int i=0;i<size; i++)
{
while(true)

cout<<f_div_regions[i]<<“:\$”;
cin>>sale;
if(sale>=0)
{
f_div_sales[i]=sale;
break;
}
else
{
cout<<“sale should be positive integer, please tryagain…n”;
}
}
}
}
//findinghighest
int findHighest(float sales[], int size)
{
float greatestSalesAmount=0;
int save_index=0;

greatestSalesAmount=sales[0];
for(int i=0; i<size; i++)
{
if(sales[i]>greatestSalesAmount)

{

greatestSalesAmount=sales[i];
save_index=i;
}
}
return save_index;
}

//printresults
void print_result(float f_sales[], string f_divisions[], intsize)
{
int highest=findHighest(f_sales,4);
\$”<<f_sales[highest];
}

. . .

• QUESTION : (Solved) : Code Wont Compile Please Help Import Javautilarrays Import Javautilscanner Public Class Ar Q31189336 . . .

import java.util.Arrays;

import java.util.Scanner;

public class ArrayCalc {

private static final double[] NaN = null;

private static Scanner input;

private static Scanner input2;

private static Scanner input3;

input = new Scanner(System. in );

int invalid = 0;

while (invalid < 10) {

System.out.println(“”);

System.out.println(“2. Subtract”);

System.out.println(“3. Multiply”);

System.out.println(“4. Divide”);

System.out.println(“5. Dot product”);

System.out.println(“6. Generate Random Number”);

System.out.println(“7. Quit”);

System.out.println(“”);

System.out.println(“What would you like to do?”);

} else {

System.out.println(“Sorry, ” + menuOption + ” is not anoption.”);

invalid++;

}

}

System.out.println(“Too many invalid inputs. Try againlater”);

System.exit(0);

return (0);

}

public static double[] getOperand(String prompt, int size) {

return null;

}

public static double getOperand(String prompt) {

System.out.println(prompt);

input = new Scanner(System. in );

return (input.nextDouble());

}

public static double[] addition(double[] operand1, double[]operand2) {

double[] resultset = new double[operand1.length];

for (int i = 0; i < operand1.length; i++)

resultset[i] = operand1[i] + operand2[i];

return resultset;

}

//Subtraction

public static double[] subtraction(double[] operand1, double[]operand2) {

double[] resultset = new double[operand1.length];

for (int i = 0; i < operand1.length; i++)

resultset[i] = operand1[i] – operand2[i];

return resultset;

}

//Multiplication

public static double[] multiplication(double[] operand1,double[] operand2) {

double[] resultset = new double[operand1.length];

for (int i = 0; i < operand1.length; i++)

resultset[i] = operand1[i] * operand2[i];

return resultset;

}

//Division

public static double[] division(double[] operand1, double[]operand2) {

if (operand2 != 0) {

double[] resultset = new double[operand1.length];

for (int i = 0; i < operand1.length; i++)

resultset[i] = operand1[i] / operand2[i];

return resultset;

} else {

System.out.println(“Divisor cannot be zero”);

return (double. null);

}

//Dot Product

public static double[] dotProduct(double[] operand1, double[]operand2) {

double[] resultset = new double[operand1.length];

for (int i = 0; i < operand1.length; i++)

resultset[i] = operand1[i] + operand2[i] + operand1[i] *operand2[i];

return resultset;

}

//Random

public static double random(double lowerLimit, doubleupperLimit, int size) {

double lower = getOperand(“What is the lower limit?”);

double upper = getOperand(“What is the upper limit?”);

double randomVal = ((double)(Math.random() * (upper – lower)) +lower);

return (randomVal);

}

public static void main(String[] args) {

input2 = new Scanner(System. in );

double[] array1 = null;

double[] array2 = null;

int arraysize = 0;

System.out.println(“How many values are in the arrays?”);

arraysize = input2.nextInt();

//1st array

array1 = new double[arraysize];

System.out.println(“Enter the values in the first array,separated by spaces: “);

input2.nextLine();

String number = input2.nextLine();

for (int i = 0; i < arraysize; i++)

array1[i] = Integer.parseInt(number.split(” “)[i]);

//2nd array

array2 = new double[arraysize];

System.out.println(“Enter the values in the secound array,separated by spaces: “);

number = input2.nextLine();

for (int i = 0; i < arraysize; i++)

array2[i] = Integer.parseInt(number.split(” “)[i]);

}

}

for (int i = 0; i < arraysize; i++)

System.out.print(results[i] + ” “);

} else if (menuOption == 2) {

double[] difference = subtraction(array1, array2);

for (int i = 0; i < arraysize; i++)

System.out.println(difference[i] + ” “);

//Subtraction

} else if (menuOption == 3) {

double[] product = multiplication(array1, array2);

for (int i = 0; i < arraysize; i++)

System.out.println(product[i] + ” “);

//Multiplication

} else if (menuOption == 4) {

double[] quotient = division(array1, array2);

for (int i = 0; i < arraysize; i++)

System.out.println(quotient[i] + ” “);

//Division

} else if (menuOption == 5) {

} else if (menuOption == 6) {

double randomVal = random(array1, array2);

System.out.println(randomVal);

//Displays a random integer between an upper and a lowerlimit

} else if (menuOption == 7) {

System.out.println(“Goodbye!”);

System.exit(0);

}

}

private static double random(double[] array1, double[] array2){

// TODO Auto-generated method stub

return 0;

}

}

. . .