Explanation:
b. the method of food processing to be done
Answer:
This question required option (See Explanation)
Explanation:
Required
How to declare 2D array
Using Java as a programming language of reference, the syntax to declare a 2D array is:
Data-Type [][] Array-Name = new Data-Type[Rows][Column]
From the question, the data type is String. So, the syntax becomes
String [][] Array-Name = new String[Rows][Column]
Assume the array name is: myArray; The above becomes
String [][] myArray= new String[Rows][Column]
<em>I will not assume values for Rows and Column, but it is worth saying that Rows and Columns are positive integers greater than 1 to make the array a 2 D array</em>
Answer: a)To have the computer close the current form when the user clicks the Exit button, the Me.Close() statement should be entered in a button’s Click event procedure
Explanation: Me.close() statement is used for the assuring that execution of the program has stopped along with stopped computer event.This statement is puts the current form into the form.closing.
Other statements are incorrect because title bar can be vanished from application,size of the form can be change while execution of application and both minimize and maximize button are in the form of set and can be removed togather only .Thus, the correct option is option(a)
Answer:
import java.util.Scanner;
public class Supermarket
{
public static void main (String[] args)
{
String item;
double pounds, ounces, price,
total, unit;
Scanner scn = new Scanner(System.in);
System.out.print("Please enter the name of item ");
item = scn.nextLine();
System.out.print("Please enter the price of " + "the item per pound : ");
price = scn.nextDouble();
System.out.print("Enter the weight of " + "the item in pounds and " + "ounces respectively : ");
pounds = scn.nextDouble();
ounces = scn.nextDouble();
unit = price/16;
total = price * (pounds + ounces/16);
System.out.print("The unit price of " + "the products sold is : " + unit);
System.out.print("\nThe total cost of the " + "amount purchased is : " + total);
}
}
Explanation:
- Ask the user to enter the price of the item and the weight.
- Calculate the unit and the total price.
- Display the unit and the total price.