Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Fix the following lines of code Float diff = {2.4 , 9.4, 2.4, 4.8} Write an arra

ID: 3710380 • Letter: F

Question

Fix the following lines of code
Float diff = {2.4 , 9.4, 2.4, 4.8}
Write an array declaration (size 50) and a supporting class Credit card transactions that contain a transaction number a merchant name and a charge
Write array declaration (size 50) and a supporting class to represent Students names for a class and homework grades for each student
Write a code that prints the values stored in a array called names backwards
Fix the following lines of code
Float diff = {2.4 , 9.4, 2.4, 4.8}
Write an array declaration (size 50) and a supporting class Credit card transactions that contain a transaction number a merchant name and a charge
Write array declaration (size 50) and a supporting class to represent Students names for a class and homework grades for each student
Write a code that prints the values stored in a array called names backwards
Fix the following lines of code
Float diff = {2.4 , 9.4, 2.4, 4.8}
Write an array declaration (size 50) and a supporting class Credit card transactions that contain a transaction number a merchant name and a charge
Write array declaration (size 50) and a supporting class to represent Students names for a class and homework grades for each student
Write a code that prints the values stored in a array called names backwards

Float diff = {2.4 , 9.4, 2.4, 4.8}
Write an array declaration (size 50) and a supporting class Credit card transactions that contain a transaction number a merchant name and a charge
Write array declaration (size 50) and a supporting class to represent Students names for a class and homework grades for each student
Write a code that prints the values stored in a array called names backwards

Explanation / Answer

Question:--- Float diff = {2.4 , 9.4, 2.4, 4.8}

Answer:--- Invalid , a float can not be declared and initialized using an initializer list: " [ ] " is missing.You can placed " [ ] " after the element type ("float") or after the reference variable ("diff").

Question:----- Write an array declaration (size 50) and a supporting class

Credit card transactions that contain a transaction number a merchant name and a charge.

Answer:----

int [ ] Transactions = new int[ 50 ];

public class Transaction

{

private int transactionNumber;

private String merchantName;

private double charge;

}

Question:--- Write array declaration (size 50) and a supporting class to represent

Students names for a class and homework grades for each student .

Answer:----

int [ ] Students = new int [50];

public class Students

{

private String name;

private int [ ] grade;

}

Question:--- Write a code that prints the values stored in a array called names backwards ?

Answer:--- for (int i = names.length - 1; i >= 0; i - - )

System .out.println (names [ i ] );