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
kotegsom [21]
3 years ago
14

9.2 code practice edhesive

Computers and Technology
1 answer:
Pavlova-9 [17]3 years ago
6 0

Answer:

import java.util.Scanner;

public class Main

{

public static void main(String[] args) {

    String NAME[]= new String[5];

    Scanner s1= new Scanner(System.in);

 System.out.println("Enter Array Elements(Names)");

 for( int i=0; i <= 4; i++)

 {

     NAME[i]= s1.nextLine();

 }

 System.out.println("Array Elements(Names)");

 for( int i=0; i <= 4; i++)

 {

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

 }

 

}

}

Explanation:

We need to write a program in java to explain the array declaration. And we have that program in the answer section.

You might be interested in
What is the default file extension for a document created in Word 2016​
navik [9.2K]

Office Open XML (OOXML) format was introduced with Microsoft Office 2007 and became the default format of Microsoft Word ever since. Pertaining file extensions include: .docx – Word document. .docm – Word macro-enabled document; same as docx, but may contain macros and scripts.

7 0
4 years ago
The establishment called ABC Enterprise requires a Java program to keep a database of the inventory of the products that it sell
Alexandra [31]

Answer:

// GetData.java

import javax.swing.JOptionPane;

public class GetData

{

  public static double getDouble(String s)

  {

      return Double.parseDouble(getWord(s));

  }

  public static int getInt(String s)

  {

      return Integer.parseInt(getWord(s));

  }

  public static String getWord(String s)

  {

      return JOptionPane.showInputDialog(s);

  }

  public static String getString(String s)

  {

      return JOptionPane.showInputDialog(s);

  }

}

// Address.java

public class Address

{

  private String street, city, state, zip;

  public Address(String str, String city, String st, String zip)

  {

      street = str;

      this.city = city;

      state = st;

      this.zip = zip;

  }

  public String getStreet()

  {

      return street;

  }

 

  public String getCity()

  {

      return city;

  }

  public String getState()

  {

      return state;

  }

  public String getZip()

  {

      return zip;

  }

}

// Manufacturer.java

public class Manufacturer

{

  private String companyName;

  private Address companyAddress;

 

  public Manufacturer()

  {

      this.companyName = "";

      this.companyAddress = null;

  }

 

  public Manufacturer(String compName, Address address)

  {

      this.companyName = compName;

      this.companyAddress = address;

  }

 

  public String getCompanyName()

  {

      return companyName;

  }

 

  public void setCompanyName(String companyName)

  {

      this.companyName = companyName;

  }

 

  public Address getCompanyAddress()

  {

      return companyAddress;

  }

 

  public void setCompanyAddress(Address address)

  {

      this.companyAddress = address;

  }

}

// Product.java

import java.text.SimpleDateFormat;

import java.util.Date;

public class Product

{

 

  SimpleDateFormat sdf = new SimpleDateFormat("MM/dd/yyyy");

 

 

  Manufacturer manufacture;

 

 

  String productName;

 

 

  int quantity;

 

 

  double unitPrice;

 

 

  Date productCreated;

 

 

  public Product()

  {

      this.productName = "";

      this.quantity = 0;

      this.unitPrice = 0.0;

      this.productCreated = null;

      this.manufacture = null;

  }

 

  public Product(String prodName, int quantity, double unitPrice,

                        Date productCreated, Manufacturer manufact)

  {

      this.productName = prodName;

      this.quantity = quantity;

      this.unitPrice = unitPrice;

      this.productCreated = productCreated;

      this.manufacture = manufact;

  }

 

 

  public Date getProductCreated()

  {

      return productCreated;

  }

 

 

  public void setProductCreated(Date productCreated)

  {

      this.productCreated = productCreated;

  }

 

  // to get the Manufacturer object

  public Manufacturer getManufacture()

  {

      return manufacture;

  }

 

  // to set the Manufacturer object

  public void setManufacture(Manufacturer manufacture)

  {

      this.manufacture = manufacture;

  }

 

  // to get the name of the product

  public String getProductName()

  {

      return productName;

  }

 

  // to set the name of the product

  public void setProductName(String prodName)

  {

      this.productName = prodName;

  }

 

  // to get the quantity of the product

  public int getQuantity()

  {

      return quantity;

  }

 

  // to set the quantity of the product

  public void setQuantity(int quantity)

  {

      this.quantity = quantity;

  }

 

  // to get the unit price of the product

  public double getUnitPrice()

  {

      return unitPrice;

  }

 

  // to set the unit price of product

  public void setUnitPrice(double unitPrice)

  {

      this.unitPrice = unitPrice;

  }

 

  // to update the quantity of the product

  public void upDateQuantity(int quantity_upDate)

  {

      quantity += quantity_upDate;

  }

 

  // to update the price of the product

  public void upDatePrice(double price_upDate)

  {

      this.unitPrice = price_upDate;

  }

 

 

  public String getProductInfomation()

  {

      String result = "";

      result += String.format("%-30s", productName);

      String dateForm = sdf.format(productCreated);

      result += String.format("\t %s", dateForm);

      result += String.format("%10d", quantity);

      result += String.format("\t%15.2f", unitPrice);

      result += String.format("\t%15s",

                          manufacture.getCompanyName());

      result += String.format("\t%20s",

                 manufacture.getCompanyAddress().getState());

      return result;

  }  

}

Explanation:

  • Create a manufacturer class to store and get information about company name and company address.
  • Create a product class to hold the manufacturer object, product name and other relevant information.
4 0
3 years ago
Dress4Win has asked you to recommend machine types they should deploy their application servers to.
tensa zangetsu [6.8K]

Answer:

Option A is the correct option.

Explanation:

Because Dress4Win is the online web organization that asked to the consultant to advice that type of machines that they want to expand their server for those application which perform the work of the mapping on the basis of the premises physical hardware cores and also in the clouds softwares that is nearest machines types of RAM.

7 0
3 years ago
You have the following code:
My name is Ann [436]

Answer:

7

Explanation:

We already have the functions that tells us how much to add. If you add all this, you will get 12. HOWEVER because cantaloupe is in the list, the computer does not count that. So if we add that again without 5(how much the cantaloupe costs), we get 7.

3 0
2 years ago
Data stored in computer systems has a high value because there is a great deal of time and effort that goes into creating an ana
Jet001 [13]

Answer:

Option (A) is the correct answer of this question.

Explanation:

Data stored in computer systems has a high importance because there is a lot of time and energy to construct an analysis, and the data is also intrinsically valuable.Intrinsic value is the intended or measured value of an entity, asset, economy or commodity established by technical analysis.

It encompasses both measurable and intangible factors.Often known as the true value is intrinsic value, which might or might not be worse than the fair market value.

Others options are incorrect because they are not related to the given scenario.

3 0
3 years ago
Other questions:
  • Assume that x is a char variable that has been declared and already given a value. Write an expression whose value is true if an
    8·1 answer
  • What is the most efficient way to include a space after each paragraph?
    13·2 answers
  • you want to search in your contacts in your email program. You enter the person's first name and last name in the search box. Yo
    8·1 answer
  • Christine would like to add something to her document that will illustrate the text. She should _____.
    10·2 answers
  • (40 pointsAnd brainliest answer ASAP) Maria is recording her friend’s graduation ceremony. How can Maria ensure that the video i
    15·1 answer
  • Why must programs written in a high level language be translated into machine language before they can run?
    14·1 answer
  • Please help me the program c++
    15·1 answer
  • What is the meaning of <br>computer<br>viruses ?​
    8·1 answer
  • Use______ to format cells when they meet a certain criteria.
    13·1 answer
  • Who invented Satellites? What purpose does it serve? How has it impacted society today?
    11·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!