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
UkoKoshka [18]
2 years ago
5

Question 5 of 50

Computers and Technology
1 answer:
erik [133]2 years ago
4 0

Answer:

D

Explanation:

because it is more safe than a key

You might be interested in
Write a program that asks a user to enter a date in month day year format (for example 10 12 2016) and displays the day of the w
AleksAgata [21]

Answer and Explanation:

Using javascript:

function dayof_theweek(){

var TodayDate = window. prompt("enter today's date in the format 'year, month, day' ");

var Datenow=new date(TodayDate);

var Dayofweek=Datenow.getday();

var Days=["monday","Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];

if(Dayofweek==indexOf(Days[Dayofweek]))

{

document.createTextnode(Days[Dayofweek]);

}

}

The program above uses a date object which uses the method getday to get the day of the week(get day returns an integer from 0 to 6).we then use a comparison operator == to test the condition that returned value Dayoftheweek is same with the index of the array Days and then print to a html document. The program may need improvements such as the fact that errors may arise when proper input isn't given, and therefore must be handled.

8 0
3 years ago
Write a C++ function, smallestIndex, that takes as parameters an int array and its size and returns the index of the first occur
Oduvanchick [21]

Answer:

Explanation:

The code in C++ is written as:

#include <iostream>

using namespace std;

int smallestIndex(int arr[],int size)

{

int min=arr[0],ind=0;

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

{

if(min>arr[i])

{

min=arr[i];

ind=i;              NOTE: ind serves as a variable that is holding the smallest

}                                   element index of array

 

}

return ind;

}

int main() {

int arr[15];

cout<<"Enter 15 integers: ";

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

cin>>arr[i];

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

cout<<arr[i]<<" "<<endl;

int index=smallestIndex(arr,15);

cout<<"The position of the first occurrence of the smallest element in list is: "<<index<<endl;

cout<<"The smallest element in list is: "<<arr[index];

}

OUTPUT:

Enter 15 integers:

4

5

8

4

6

1

2

1

4

5

7

9

5

7

8

4   5  8  4  6  1  2  1  4  5  7  9  5  7  8  

The position of the first occurrence for the smallest element in the list is 5

The smallest element in the list is: 1

7 0
3 years ago
Which sentence best describes the executive branches of state
melamori03 [73]

Answer:

B... I think...

Explanation:

The executive branch of every state is headed by an elected Governor. Most states have a plural executive, in which several key members of the executive branch are directly elected by the people and serve alongside the governor.

8 0
3 years ago
Please design a Java GUI application with two JTextField for user to enter the first name and last name. Add two JButtons with a
Ede4ka [16]

Answer:

Check the explanation

Explanation:

Code :

import java.awt.*;

import java.awt.event.*;

import javax.swing.*;

public class nameFrame {

private JFrame mainFrame;

public nameFrame(){

prepareGUI();

}

public static void main(String[] args){

nameFrame nameFrame = new nameFrame();

}

private void prepareGUI(){

mainFrame = new JFrame("Name Frame");

mainFrame.setSize(450,250);

mainFrame.setLayout(new GridLayout(5, 2));

 

mainFrame.addWindowListener(new WindowAdapter() {

public void windowClosing(WindowEvent windowEvent){

System.exit(0);

}

});  

JLabel fname= new JLabel("First Name : ");

JLabel lname = new JLabel("Last Name : ");

JLabel fullname = new JLabel("Full Name : ");

JTextField fnameText = new JTextField(15);

JTextField lnameText = new JTextField(15);

JTextField fullnameText = new JTextField(30);

fullnameText.setEditable(false);

JButton submit = new JButton("submit");

submit.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {  

String data = fnameText.getText() + " " + lnameText.getText();

fullnameText.setText(data);

}

});

JButton clear = new JButton("clear");

clear.addActionListener(new ActionListener() {

public void actionPerformed(ActionEvent e) {  

fnameText.setText("");

lnameText.setText("");

fullnameText.setText("");

}

});

mainFrame.add(fname);

mainFrame.add(fnameText);

mainFrame.add(lname);  

mainFrame.add(lnameText);

mainFrame.add(fullname);  

mainFrame.add(fullnameText);

mainFrame.add(submit);

mainFrame.add(clear);

mainFrame.setVisible(true);

}

}

Kindly check the attached output image below.

5 0
3 years ago
What does the gravity setting of a jump control?
Vikki [24]

Answer:

A

Explanation:

3 0
3 years ago
Other questions:
  • To resize an embedded chart, ____. select one:
    5·1 answer
  • Please reply only in CORAL. I am not sure how to get the numbers between the negative version and positive version of the input
    10·1 answer
  • Assume you're using a 3 button mouse. to access shortcut menus, you would
    6·2 answers
  • Deleting a footnote or endnote reference mark in a document only deletes the reference mark but not the actual footnote or endno
    14·1 answer
  • Which type of multiplexing divides transmission opportunities into slots of 125 microseconds with position inside each slot rese
    10·1 answer
  • Hey so if an instagram account has an email attached to it but a person no longer has access to that email, how do they get back
    10·1 answer
  • Outputting all combinations. Output all combinations of character variables a, b, and c using this ordering abc acb bac bca cab
    7·1 answer
  • Your task is to diagnose and correct the problem. In the computer, the top hard drive contains the operating system files. Troub
    14·1 answer
  • বর্তমান করােনার ন্যায় পরিস্থিতি অর্থাৎ স্বাভাবিক শ্রেণি কার্যক্রম পরিচালনা সম্ভব
    10·2 answers
  • Can someone please entertain me and talk right now, because I'm just so bored that I may lose my mind.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!