I am a beginner in Java programming after a few lessions I was provided with this task and I have no clue how to go about it.this appears to be simple but for me is a mountain, if any one could help I will really appreciate it. Here goes the question
Design and implement a program that allows the user to enter into an array the price of a number of grocery products in Euro. The program should then copy this array into another array but convert the price of each product from Euro to pounds sterling. The user should be asked how many items they wish to purchase and the arrays sized accordingly. The program should allow The user to enter the exchange rate of Euro to pounds and should when it terminates, display the contents of the both arrays and the total cost of the order in both currencies.
N/B you must make use of method in your program to carry out these tasks
, This is what I have done so far and i believe i don't know what i am doing, just need a help, any instruction on how to even start will be of great help.
class GroceryPrice{
public static void main(string[] args){
double price;
double euro;
double pounds;
double rate = .87;
int item;
double array1[]= {2.56,3.31,4.06,5.75,8.22,9.01};
double array2[] = new double[6];
System.out.println("Please enter grocery price in euro");
euro = EasyIn.getDouble();
System.out.println("please enter rate");
rate = EasyIn.getDouble
pounds = euro * rate;
System.out.println(euro + " euros is equal to " + pounds+" Pounds ");
System.out.println("array1");
for (int i=0; i<array1.length; i++)
{
System.out.print(" "+array1[i]);
}
System.out.println("\narray2:");
for(int j=0; j<array1.length; j++){
array2[j] = array1[j];
System.out.printnl(" "+ array2[j]);
}
System.out.println("Please enter the number of items you wish to purchase");
item = EasyIn.getInt();
}
}