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
krok68 [10]
3 years ago
13

Assume that two parallel arrays have been declared and initialized: healthOption an array of type char that contains letter code

s for different healthcare options and annualCost an array of type int. The i-th element of annualCost indicates the annual cost of the i-th element of healthOption. In addition, there is an char variable, best2.Write the code necessary to assign to best2 the health option with the lower annual cost, considering only the first two healthcare options.
Computers and Technology
1 answer:
eduard2 years ago
6 0

/*

Since we have to check the first two options only as mentioned in last part of question the loop will work 2 times only and will compare the cost of first element and second and assign the healthoption accordingly

*/

for(int i =0;i<=1;i++){

if(annualCost[i]<annualCost[i+1]

best2 = healthOption[i]

else

best2 = healthOption[i+1]

}

You might be interested in
Class 10 computer unit 1 all excersise​
kenny6666 [7]
Y’all just asking for people do your work, literally not even a question
5 0
2 years ago
Write code which takes a sentence as an input from the user and then prints the length of the first word in that sentence.
Afina-wow [57]

import java.util.Scanner;

public class U2_L3_Activity_Four {

   public static void main(String[] args) {

       Scanner scan = new Scanner(System.in);

       System.out.println("Enter a sentence.");

       String sent = scan.nextLine();

       int count = 0;

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

           char c = sent.charAt(i);

           if (c != ' '){

               count++;

       }

           else{

               break;

           }

       

   }

       System.out.println("The first word is " + count +" letters long");

   

   }

}

We check to see when the first space occurs in our string and we add one to our count variable for every letter before that. I hope this helps!

7 0
2 years ago
What are the Database used in RDBMS and DBMS<br>please answer immediately​
frosja888 [35]

Answer:

The best example for the DBMS is certainly the Microsoft Access. And various examples of RDBMS are MySQL, Sql Server, Amazon DynamoDB and so on. However, its essential to understand the difference between the RDBMS and the DBMS. The main difference between the two is certainly that in the RDBMS the application stores the data in tabular manner, and DBMS the data is stored as files. In the RDBMS the tables comes with identifier known as primary key, and the data values are being saved in the form of tables.

Explanation:

Please check the answer section.

4 0
2 years ago
Match the vocabulary to the appropriate definition.
Allisa [31]

Answer:

Pulling related code together in objects is Arrays

Helps programmers when they revisit code or are new to code-- Documentation

Explanation:

This is all I know

3 0
2 years ago
What type of socket should be used with an air impact wrench
Vikentia [17]
<span>Black sockets should be used, but the color is not the reason why. Chrome sockets will cause splits to form in the socket walls pretty quickly, after only a few uses. But the black sockets are that color because they have gone through a process called Parkerizing that coats the surface of the socket in order to provide more resistance when being used and protect the socket against corrosion.</span>
3 0
2 years ago
Other questions:
  • The two types of objects responsible for collecting data are
    14·1 answer
  • By generating and delivering timely and relevant information supported by networks, _____ creates new opportunities for conducti
    15·1 answer
  • Is it just me or is brainly not working right now? I am trying to add friends and it won't let me!
    5·2 answers
  • Describe Ms word environment.​
    14·1 answer
  • Drag each tile to the correct box.
    11·1 answer
  • identify at least three additional ethical responsibilities expected from a computer professional. In brief, explain each respon
    11·1 answer
  • Who found the first computer bug in 1947, and invented the concept of a compiler in 1952
    6·1 answer
  • Write a program that reads in an integer, and breaks it into a sequence of individual digits. Display each digit on a separate l
    14·1 answer
  • Define the instance method inc_num_kids() for PersonInfo. inc_num_kids increments the member data num_kids. Sample output for th
    6·1 answer
  • Copy and paste is the only way to move text from one place to another.<br><br>True or <br>False​
    15·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!