Most materials 1 increases ne way to quantify this is with t

Most materials 1 increases ne way to quantify this is with the volumetric coefficien thermal expand as their temperature expansion (a) [inverse To calculate the change in volume of an object, you can use where is is the the change in temperature, and Vis the initial volume. Thus the new volume after a temperature char initial plus sv. Part A ro 51 101 1.7 42 88.1 Create the variable sphData containing the matrix shown 1,5 87 133 to 8 54 76.2 Each row of sphData contains information about a solid sphere. The first column contains the masseslkilogramsl the second column contains the coefficients of thermal expansion [10e/kelvin]: the third column contains the volumes at a temperature of 20 degrees Celsius [cubic centimetersl Part B: Assume the initial temperature of the spheres is 20 degrees Celsius. Place this value into the variable InitT. Part Ask the user to type their last name and place the response in Enter your last name: Park LastName. Part D: Ask the user to enter their first name in an input dialog box and place Enter your first nane: Willy the response in FirstName. Part E: Using the original matrix sphData, print the following The minimum mass is 0.8 kg sentence to the command window. Part F: Ask the user to enter a new temperature value to which the Enter a new tenperature (deg cl 370 spheres are heated (or cooled) Place this value in NewT, Part G: Determine the change in temperature between the new temperature and the initial temperature and place in the variable DeltaT, For the following you code should work correctly regardless of the number of spheres (rows) represented in the matrix sphData. NOT code each row separately, Part H: create a fourth column in SphData containing the specific gravities the spheres. Be sure to include the conversion from kilograms to grams in your calculation. Part create a matrix NewsphData containing the same information as the first two columns in sphData. Part J Using the information in s and DeltaT, add a third column to NewsphData containing the volumes of the spheres at the new temperature using the equation: Vnew a VAT v. IMPORTANT NOTE: As specified at the beginning of this question the expansion coefficients given are one million times Iarger than their actual values, so you need to divide each alpha value by 10e somewhere in your calculations. Page 1 of 5

Solution

Please find the solution in Java as:

import java.util.ArrayList;
import java.util.List;
import java.util.Scanner;


   public class Assignment {

  
   public static void main(String[] args) {
       float minMass=32765;
       float initT = 20;
       String LastName;
       String FirstName;
       float newT;
       float DeltaT;
      
       //Creating an array
       List<float[]> list = new ArrayList<>();
       // Adding values to the array
       list.add(new float[] {(float) 0.9, 51, 101});
       list.add(new float[] {(float) 1.7, 42, (float) 88.1});
       list.add(new float[] {(float) 1.5, 87, 133});
       list.add(new float[] {(float) 0.8, 54, 76});
      
       // prompting to ask last name and first name.
       Scanner in = new Scanner(System.in);         
   System.out.println(\"Enter your Last Name:\");
   LastName = in.nextLine();         
   System.out.println(\"Enter your First Name:\");
   FirstName = in.nextLine();
      
   //finding the minimum mass value present in the matrix.
       for (float[] row : list) {          
           if(row[0]<minMass){
               minMass=row[0];
           }       
       }
      
       //printing the minimum mass value.
       System.out.println(\"The minimum mass is \"+minMass+\" Kg.\");
      
       //prompting for new temperature
       System.out.println(\"Enter a new temprature[deg C]:\");
       newT = in.nextFloat();
      
       //Calculating difference between new temperature and initial temperature.
       DeltaT = newT - initT;
       System.out.println(\"The change in temperature is \"+DeltaT+\" degree Celcius.\");
   }
}

 Most materials 1 increases ne way to quantify this is with the volumetric coefficien thermal expand as their temperature expansion (a) [inverse To calculate th
 Most materials 1 increases ne way to quantify this is with the volumetric coefficien thermal expand as their temperature expansion (a) [inverse To calculate th

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site