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
xeze [42]
3 years ago
6

Write an application that allows a user to select a country from a list box that contains the following seven options. After the

user makes a selection, display the country’s capital city.
Country
Capital Austria
Vienna Canada
Toronto England
London France
Paris Italy
Rome Mexico
Mexico City Spain
Madrid
Computers and Technology
1 answer:
hodyreva [135]3 years ago
6 0

Answer:

Programming Language not stated;

But this application definitely requires a graphical user interface platform (so, I'll use Microsoft Visual C# - Winforms).

Controls to be used are.

1. Form

2. List box

I'll name the Form, Form1 and the list box, listbox1.

Explanation:

The code goes thus;

private void Form1_Load(object sender, System.EventArgs e)

{

//Load country into empty listbox

listbox1.Items.Add("Austria");

listbox1.Items.Add("Canada");

listbox1.Items.Add("England");

listbox1.Items.Add("France");

listbox1.Items.Add("Italy");

listbox1.Items.Add("Mexico");

listbox1.Items.Add("Spain");

}

private void listbox1_SelectedIndexChanged(object sender, System.EventArgs e)

{

//Check if an item is really selected

if(listbox1.SelectedIndex >= 0)

{

//Index 0 represents 1st item that was added to the listbox and that's Austria

if(listbox1.SelectedIndex ==0)

{

MessageBox.Show("Vienna");

}

else if(listbox1.SelectedIndex == 1)

{

MessageBox.Show("Toronto");

}

else if(listbox1.SelectedIndex ==2)

{

MessageBox.Show("London");

}

else if(listbox1.SelectedIndex == 3)

{

MessageBox.Show("Paris");

}

else if(listbox1.SelectedIndex ==4)

{

MessageBox.Show("Rome");

}

else if(listbox1.SelectedIndex == 5)

{

MessageBox.Show("Mexico City");

}

else if(listbox1.SelectedIndex == 6)

{

MessageBox.Show("Madrid");

}

}

else

{

MessageBox.Show("No item selected");

}

}

You might be interested in
8. This machine is used for high speed, high volume printing l. Can print about 1000 papers at one point in time.
seropon [69]

Answer:

Risographs can produce up to typically 150 pages per minute. So I'm guessing its c.

Explanation:

5 0
3 years ago
5-11) (Find the Smallest Value) Write an application that finds the smallest of several integers. Write a program which first as
Elanso [62]

Answer:

import java.util.Arrays;

import java.util.Scanner;

public class num4 {

   public static void main(String[] args) {

   Scanner in = new Scanner(System.in);

       System.out.println("How many numbers? ");

       int n = in.nextInt();

       int []intArray = new int[n];

       //Entering the values

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

           System.out.println("Enter the numbers");

           intArray[i]=in.nextInt();

       }

       System.out.println(Arrays.toString(intArray));

       int min =intArray[0];

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

           if(min>intArray[i]){

               min = intArray[i];

           }

       }

       System.out.println("The Minimum of the numbers is "+min);

   }

}

Explanation:

  • Using Java programming language
  • Prompt the user for the number of values
  • Using Scanner class receive and store in a variable
  • Create an array of size n
  • Using an for loop continuously ask the user to enter the integers
  • Print the array of integers
  • Using another for loop with an if statement, find the smallest element in the array of numbers
  • Output the the smallest number
8 0
3 years ago
Interactive sites where users write about personal topics and comment to a threaded discussion are called?
larisa [96]

Answer:

C. forums

Explanation:

Forums are internet sites where users can meet to discuss different topics through the use of messages thereby forming chat rooms. An internet forum can be in form of a question and answer site. Most websites have internet forums where users can meet and discuss or ask questions. Sometimes there may be moderators that ensure that the posted messages are acceptable based on guidelines.

4 0
3 years ago
PLEASE HELP
Schach [20]

Answer:

Here

Explanation:

If you use a single user account on your computer, everyone will share the same application settings, files, and system permissions. Application Settings: When you use a single user account, everyone using the computer will use the same browser. Most programs will use different settings for each user account.User accounts also serve as a means for granting permissions, applying logon scripts, assigning profiles and home directories, and linking other working-environment properties to a user.

hope it helps ;P

7 0
3 years ago
What is the value of alpha[3] after the following code executes?
12345 [234]

Answer:

Option (4) i.e., 10 is the correct answer to the following question.

Explanation:

Here, in the following question that is written in the Java Programming Language in which they set an integer data type array variable "alpha" and pass index value 5 then 3. Set the for loop which is starets from 4 to 0 in reverse order then, initialize the value of the variable "j + 5" in the array variable alpha then, check condition if j is less than equal to 2 then perform calculation "alpha[j + 1] = alpha[j] + 3".

6 0
3 years ago
Other questions:
  • Here is a Test Code segment:
    13·1 answer
  • Possible consequences for plagiarism, listed in CAVA's Academic Integrity Policy, may include:
    9·1 answer
  • Janet manages the security of the database servers at the mortgage company where she works. The servers are Windows Server 2016;
    15·1 answer
  • I have an LG phone. Since I just bought my phone, my bill to text message isn't paid yet. I texted a couple of things playfully
    5·2 answers
  • How can I collect tweets from different accounts concurrently and categorize the tweets in a corpus?
    15·1 answer
  • Complete the below method, isPalindrome(), that takes in a String and returns a boolean. The boolean should be true if the Strin
    7·1 answer
  • The term that refers to the standard computer language for creating web pages is called:
    6·1 answer
  • Why would researching the average earnings by major and by career be useful to you as you choose an institute for higher educati
    10·1 answer
  • The Bradshaw family has $200,000 of total assets and $140,000 of liabilities. What is their net worth?
    15·1 answer
  • What is the key difference between a class and an object
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!