Further Challenge Questions Challenge Question 1 Most materi

Further Challenge Questions Challenge Question 1 Most materials expand as their temperature increases. One way to quantify this is with the volumetric coeficient of thermal expansion (a) [inverse kelvins, K 1 . To calculate the change in volume of an object, you can use where aT is the change in temperature, and Vis the Initial volume. Thus the new volume after a temperature change is the initial volume plus AV. Part A 0.9 51 101 1.7 42 88.1 Create the variable SphData containing the matrix shown: 15 87 133 0.8 54 76.2 Each row of sphData contains information about a solid sphere. The first column contains the masses[ second column contains temperature of 20 degrees Celsius (cubic centimeters. Part B: c the coefficients of thermal expansion [10/kelvinl:the third column contains the volumes at a Assume the initial temperature of the spheres is 20 degrees Celsius. Place this value into the variable InitT Part C: Ask the user to type their last name and place the response in LastName. Part D: Ask the user to enter their first name in an input dialog box and place the response in PirstNane. Enter your last name: Park Enter your first name: willy Part E: Using the original matrix SphData, print the following sentence to the command window Part F: Ask the user to enter a new temperature value to which the spheres are heated (or cooled). Place this value in Newr. Part G: Determine the change in temperature between the new temperature and the initial temperature and place in the variable Deltar The minimum mass is 0.8 xg. Enter a new temperature [deg cl: 370 For the following, you code should work correctly regardless of the number of spheres (rows) represented in the matrix SphData. DO NOT code each row separately. Part H: Create a fourth column in sphData containing the specific gravities of the spheres. Be sure to include the conversion from kilograms to grams in your calculation. Part l: Create a matrix NewsphData containing the same information as the first two columns in SphData. Part J: Using the information in SphData and DeltaT, add a third column to NewsphData containing the volumes of the spheres at the new temperature using the equation: Vrew-? VAT + V. IMPORTANT NOTE: As specified at the beginning of this question, the expansion coefficients given are one million times larger than their actual values, so you need to divide each alpha value by 106 somewhere in your calculations. Page 1 of 5

Solution

ANS:

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.\");
   }
}

rate thumbsup

IF U HAVE ANY DOUBT PLEASE COMMENT BELOW

 Further Challenge Questions Challenge Question 1 Most materials expand as their temperature increases. One way to quantify this is with the volumetric coeficie
 Further Challenge Questions Challenge Question 1 Most materials expand as their temperature increases. One way to quantify this is with the volumetric coeficie

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site