1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Olin [163]
3 years ago
9

Write a java program that use multiple arrays This is a simple array program which does not use an "external class & demo pr

ogram" If you wish, you may break it down into methods, but that is not required. a. Set up 4 arrays which hold data about 6 items you want to sell: [make them up] int[ ] itemnum int[ ] quantity double[ ] price double[ ] sales b. Set up loops to load the itemnum, quantity and price arrays c. Set up another loop to calculate values for the sales array. [= price * quantity] d. Set up another loop to print the item number and sales amount for each transaction . e. Set up another loop to calculate the total sales of all 6 items f. print the total sales amount
Computers and Technology
1 answer:
ValentinkaMS [17]3 years ago
4 0

Answer:

Explanation:

import java.util.Array;

public class Items{

public static void main (String {} args){

// a. Set up 4 arrays which hold data about 6 items you want to sell

int [] itemnum = new int[](1,2,3,4,5,6);

int [] quantity = new int[](500,200,350,100,270,300);

double [] price = new double [](10000, 50000,30000, 22000, 26000,100200);

double[] sales = new double [6];

//b. Set up loops to load the itemnum, quantity and price arrays

for(int I=0;I<6;I++)

{

System.out.println("Item "+itemnum[I]);

System.out.println("Item "+quantity[I]);

System.out.println("Item "+price[I]);

}

//c. Set up another loop to calculate values for the sales array.

for(int j=0;j<6;j++)

{

sales[j] = quantity[j] * price[j];

}

//d. Set up another loop to print the item number and sales amount for each transaction

for(int k=0;k<6;k++)

{

System.out.println("Item Number "+itemnum[k]);

System.out.println("Sales Amount "sales[k]);

}

//e. Set up another loop to calculate the total sales of all 6 items

double totalsales = 0;

for(int l=0;l<6;l++)

{

totalsales+=sales[l];

}

//f. print the total sales amount

System.out.print("Total Sales: "+totalsales);

}

}

You might be interested in
Which pickaxe in minecraft to use?
Law Incorporation [45]

Answer:

Diamond pickaxe with efficiency 3

Explanation: It will mine quicker and you can just get unbreaking

6 0
3 years ago
Jen's laptop that is wirelessly connected to the home network router and turned on; her husband's PC, which connects to the rout
SVETLANKA909090 [29]

Answer:

The network is a LAN.

Explanation:

Computer networks are interconnection and intercommunication of computer devices to share resources. There are several types of computer networks, they are, LAN or local area network, WAN or wide area network, PAN or personal area networks, etc.

A LAN is a network of computer devices ranging from a floor of a building to the building of more. WAN is a network of LANs while a PAN is just a short 10-meter network between two Bluetooth connected devices.

The network described in the question is a wireless LAN or WLAN which is still a local area network.

8 0
3 years ago
What makes the Columbus<br> Research Laboratory<br> different from Earth Labs?
Kitty [74]

Answer:

The Columbus laboratory is ESA’s largest single contribution to the International Space Station. It was also the first permanent European research facility in space.

Explanation: that is something I know i don’t know if it will help you with your answer

4 0
2 years ago
How does the PC support page of About.com make it quick and easy for users to identify and fix errors?
Simora [160]

Answer:

It offers advice on how to repair and maintain your computer.

Explanation:

About.com does not exist anymore sadly. However, it is available with a new name dot dash. And the PC support option is available under livewire. And here you can get advice on how to repair and maintain your computer. And that was the theme behind the About.com. And it has nothing to do with the links to useful tech support websites and forums, or it does not advertise the software which protects you from third-party threats. And it does not as well detail the list of error messages and the symptoms. And hence the correct option is as mentioned in the Answer section.

6 0
4 years ago
Calculate and express your answer in decimal form.
mr Goodwill [35]

Answer:

ポイントが欲しいだけなのかわからない

Explanation:

何語を話していますか

5 0
3 years ago
Other questions:
  • Janet has to create a webpage for a software company that should be accessible from both desktop computers and mobile devices. W
    12·1 answer
  • What are the two main advantages to a well-designed relational database over other types?
    10·1 answer
  • Roblox published a series of videos to help their audience use their creation engine, what are they called?​
    9·2 answers
  • Define a pointer variable named daco that can be used for objects of the class Banana.
    14·2 answers
  • What are the other way of getting website static​
    14·2 answers
  • Write a program that will predict the size of a population of organisms. The program should ask the user for the starting number
    8·1 answer
  • I want to make apps but I don't know how and which things I have to learn first ,so if you know mention from starting to ending​
    11·1 answer
  • PLS HURRY!!!<br> Look at the image below!
    9·2 answers
  • Usually it is a rectangular box placeed or underneath your desk​
    15·1 answer
  • Write a C++ program to calculate the course score of CSC 126. 1. A student can enter scores of 3 quizzes, 2 exams, and a final e
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!