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
hammer [34]
3 years ago
9

Given a one-dimensional array named yearlySalesTotals that contains decimal values, code the first line of a for statement that

declares an index, a Boolean expression for ending the for loop, and an increment expression that lets you use the index to refer to each element in the array.
Computers and Technology
1 answer:
VashaNatasha [74]3 years ago
7 0

Answer:

for(int i =0; i<yearlySalesTotals.length;i++)

Explanation:

The for statement in has the syntax as given above, it has an int variable indicating the starting index, then a boolen condition ensuring that you don't get out of the array bounds, and an increment operator.

See below a complete program in java that will output all elements of the array  assuming the array yearlySalesTotals contains only ten elements and all indexes has been assigned values.

public class ANot {

   public static void main(String[] args) {

double []yearlySalesTotals = new double[10];

for(int i = 0; i<yearlySalesTotals.length; i++){

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

   }

}

}

You might be interested in
1.) Florida has ____________ roads that are designated as part of the National Highway System.
salantis [7]
Answer to number two is b, 3 is b, those are the ones i know
3 0
3 years ago
¿porque y como surge la informatica y las computadoras
LekaFEV [45]

Answer: La informática es el futuro: un puente hacia todas las cosas útiles.

La informática aprovecha el poder y la posibilidad de la tecnología digital para transformar datos e información en conocimiento que la gente usa todos los días. Este fuerte enfoque en el uso humano de la informática ayuda a las personas a interactuar con la tecnología de la mejor y más eficiente manera posible.

Explanation:

8 0
3 years ago
What types of printed information are useful to obtain from your target employers?
kap26 [50]

Answer:

I think its A and B,hope it helps

6 0
3 years ago
Create a class called Clock to represent a Clock. It should have three private instance variables: An int for the hours, an int
Anvisha [2.4K]

Answer:

public class Clock

{

private int hr; //store hours

private int min;  //store minutes

private int sec; //store seconds

public Clock ()

{

 setTime (0, 0, 0);

}

public Clock (int hours, int minutes, int seconds)

{

 setTime (hours, minutes, seconds);

}

public void setTime (int hours, int minutes, int seconds)

{

 if (0 <= hours && hours < 24)

      hr = hours;

 else

      hr = 0;

 

 if (0 <= minutes && minutes < 60)

      min = minutes;

 else

      min = 0;

 

 if (0 <= seconds && seconds < 60)

      sec = seconds;

 else

      sec = 0;

}

 

 //Method to return the hours

public int getHours ( )

{

 return hr;

}

 //Method to return the minutes

public int getMinutes ( )

{

 return min;

}

 //Method to return the seconds

public int getSeconds ( )

{

 return sec;

}

public void printTime ( )

{

 if (hr < 10)

      System.out.print ("0");

 System.out.print (hr + ":");

 if (min < 10)

      System.out.print ("0");

 System.out.print (min + ":");

 if (sec < 10)

      System.out.print ("0");

 System.out.print (sec);

}

 

 //The time is incremented by one second

 //If the before-increment time is 23:59:59, the time

 //is reset to 00:00:00

public void incrementSeconds ( )

{

 sec++;

 

 if (sec > 59)

 {

  sec = 0;

  incrementMinutes ( );  //increment minutes

 }

}

 ///The time is incremented by one minute

 //If the before-increment time is 23:59:53, the time

 //is reset to 00:00:53

public void incrementMinutes ( )

{

 min++;

 

if (min > 59)

 {

  min = 0;

  incrementHours ( );  //increment hours

 }

}

public void incrementHours ( )

{

 hr++;

 

 if (hr > 23)

     hr = 0;

}

public boolean equals (Clock otherClock)

{

 return (hr == otherClock.hr

  && min == otherClock.min

   && sec == otherClock.sec);

}

}

3 0
3 years ago
The overall cost of wiring in addressable fire alarm system is significantly cheaper than the conventional one. Why is it so?
stellarik [79]

Answer:

Yes, The overall cost of wiring in addressable fire alarm system is significantly cheaper than the conventional one.But the addressale fire alram system is more reliable than a conventional system.

Explanation:

Conventional systems are hardware-based and use analog technology. where addressable fire alarm use digital technology. addressable system is generally more reliable than a conventional system mainly due to how the different systems are wired. With a conventional system, if a device’s wire is damaged or severed, its signal and the signal of other devices down the line cannot be transmitted to the control panel.

With an addressable system, both ends of the wire connect to the control panel. Therefore, if one end becomes damaged or severed, signals can still reach the control panel through the other end of the loop. In addressable systems, a device can be removed or disabled and it will not affect the other devices in the loop.

7 0
3 years ago
Other questions:
  • The component in a disk brake unit acts as a return spring and allows the pad to move a ay from the rotor is the
    6·1 answer
  • A DESKTOP COMPUTER (NAMED WORKSTATION22) CAN'T CONNECT TO THE NETWORK. A NETWORK CARD WAS PURCHASED WITHOUT DOCUMENTATION OR DRI
    14·1 answer
  • Narrow margins are helpful for which task?
    6·1 answer
  • What is not an option when a user is exporting contacts to share with others?
    10·1 answer
  • 2.8 Code Practice: Question 2
    11·1 answer
  • Why is it NOT a good practice to save everything on the desktop?
    6·2 answers
  • The term integration mean?
    7·2 answers
  • In fnaf who´s spring trap in fnaf 3 and who are the five victim names that he murdered and lure them into the back room.
    10·2 answers
  • The __________ statement allows you to check for
    7·1 answer
  • Five uses of the operating system​
    10·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!