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
Katena32 [7]
2 years ago
11

Write a program that does the following:

Computers and Technology
1 answer:
Nataly_w [17]2 years ago
8 0

Answer:

Following is the program in Java language:

import java.util.*;//import package

public class Main // main class

{

public static void main(String[] args) // main method

{

    String  firstname,lastname; // Declare the two String variables

    Scanner ob=new Scanner(System.in); // create a object of scanner //class

    System.out.println("Enter the first name:");  // Prompt the user for // enter the first name

   firstname=ob.nextLine();// Read in the first name by user

    System.out.println("Enter the last name:"); // Prompt the user for last //name

   lastname=ob.nextLine();// Read in the last name by user

   System.out.println("Hello " + firstname +' ' +lastname); // print the //firstname,lastname

}

}

Output:

Enter the first name:

San

Enter the last name:

ert

Hello San ert

Explanation:

Following are the description of program

  • Declared two variable of string type i.e "firstname"  and "lastname".
  • Create a instance or object  of scanner class .i.e "ob".
  • Prompt the user to enter the first name in the  "firstname" variable
  • Read in the first name by the user by using the method nextLine() in the first name variable
  • Prompt the user to enter the  last name.
  • Read in the last name by the user by using the method nextLine() in the lastname variable.
  • Finally, print the first name and last name.

You might be interested in
Given class triangle (in files triangle.h and triangle.cpp), complete main() to read and set the base and height of triangle1 an
kow [346]

The C++ program that would complete the main () and set the base and height of triangle1 and of triangle2 is:

main.cpp

#include <iostream>

#include "Triangle.h"

using namespace std;

int main()

{

   Triangle Tri1;  

Triangle Tri2;

   double base1, height1, base2, height2;

   cout << "Enter a base for your Triangle1: ";

   cin >> base1;

   cout << "Enter a height for your Triangle1: ";

   cin >> height1;

   cout << endl;

   cout << "Enter a base for your Triangle2: ";

   cin >> base2;

   cout << "Enter a height for your Triangle2: ";

   cin >> height2;

   cout << endl;

   

   cout << "################################" << endl;

   

   cout << "Triangle with larger area:" << endl;

   if ((0.5)*base1*height1 > (0.5)*base2*height2){

      Tri1.setValues(base1, height1);

      Tri1.getValues();

      cout << "Area: " << Tri1.getArea() << endl << endl;

}

else{

 Tri2.setValues(base2, height2);

 Tri2.getValues();

    cout << "Area: " << Tri2.getArea() << endl;

}

   

   return 0;

}

Read more about C++ programs here:

brainly.com/question/20339175

#SPJ1

3 0
1 year ago
For the description below, develop an E-R diagram:
xeze [42]

Answer:

See explaination

Explanation:

E-R diagram:

Entity Relationship Diagram, also known as ERD, ER Diagram or ER model, is a type of structural diagram for use in database design. An ERD contains different symbols and connectors that visualize two important information: The major entities within the system scope, and the inter-relationships among these entities.

Please kindly check attachment for for the ERD of the question asked.

4 0
3 years ago
What is the capture of transaction and event information using technology to (1) process the information according to defined bu
Tanya [424]

Answer:

OLTP(Online transaction processing)  is the correct answer.

Explanation:

It is the database application that is used to catching the transection and that data or information which is related to the technology for the purpose of.

  • Process that data and information which is related to the following rules of the business or company.
  • It stores the data or information related to the online transaction.
  • It also helps to modify the current data or information for the new data or information.
6 0
3 years ago
If wire rope guard rails are used what must also be done?
zzz [600]
A Deceleration device.
A rope, wire rope, or strap with connectors at each end for connecting the 5 point body harness to a lifeline, or anchorage.

Look under OSHA Flashcards on Quizlet and..
OSHA: Fall Protection in Construction, Subpart M and just past that area in the document.

This is from that document on page 13 and 14:  
Fall Restraint Systems:  While fall restraint systems are not mentioned in Subpart M, OSHA recognizes a fall restraint system as a means of prevention. The system, if properly used, tethers a worker in a manner that will not allow a fall of any distance. This system is comprised of a body belt or body harness, an anchorage, connectors, and other necessary equipment. Other components typically include Photo: Skip Pennington OCCUPATIONAL SAFETY AND HEALTH ADMINISTRATION 1 4 a lanyard, a lifeline, and other devices. For a restraint system to work, the anchorage must be strong enough to prevent the worker from moving past the point where the system is fully extended, including an appropriate safety factor. *In a November 2, 1995 interpretation letter to Mr. Dennis Gilmore, OSHA suggested that, at a minimum, a fall restraint system must have the capacity to withstand at least 3,000 pounds or twice the maximum expected force that is needed to restrain the person from exposure to the fall hazard. In determining this force, consideration should be given to site-specific factors such as the force generated by a person (including his/her tools, equipment, and materials) walking, slipping, tripping, leaning, or sliding along the work surface.

8 0
3 years ago
You are responsible for the administration of your Windows Server 2016 DNS server, which is installed on a domain controller as
kvv77 [185]

Answer:

A. domain adminsb because maybe it might be the right answer.

8 0
3 years ago
Other questions:
  • To determine what to study, one should first
    8·1 answer
  • A ________ is a user-interface component with two states: checked and unchecked. radio button check box menu item submenu item
    5·1 answer
  • Which of the following is used by credit card companies to determine APR?
    10·2 answers
  • You decide to begin your presentation by providing your audience an overview of networking, with an emphasis on security and why
    11·1 answer
  • When a partition is formatted with a file system and assigned a drive letter it is called a volume?
    10·1 answer
  • I have a question. This question will probably be deleted, but why do moderators keep deleting my answers when they are legitima
    13·1 answer
  • Using C++
    13·1 answer
  • WILL GIVE A BRAINLIEST!!! PLS HELP!!!
    5·1 answer
  • A hub is a central computer true or false?
    13·2 answers
  • Write a python program to check whether the number is divisible by 7. If its divisible, print its divisible otherwise find previ
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!