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
blondinia [14]
3 years ago
14

Define a class named person that contains two instance variables of type string that stores the first name and last name of a pe

rson and appropriate accessor and mutator methods. Also create a method named displayDetails that outputs the details of a person
Computers and Technology
1 answer:
Katarina [22]3 years ago
5 0

Answer:

Answered below

Explanation:

//Program is written using Java programming language.

Class Person {

private string firstName;

private string lastName;

void set firstName(string a){

firstName = a;

}

string getFirstName(){

return firstName;

}

void setLastname( string b){

lastName = b;

}

string getLastName( ){

return lastName;

}

void displayDetails( ) {

System.out.print(firstName);

System.out.print (lastName);

}

}

//Test program

Class Main{

public static void main(String args [] ){

Person person = new Person( )

person.setFirstName("Karen")

System.out.print(person.getFirstName)

person.displayDetails()

}

}

You might be interested in
Which Cisco IOS command is used to disable a device from performing naming lookups?
Ilia_Sergeevich [38]

Answer:

No ip dns server.

Explanation:

The DNS stands for domain name services. It can be statically or dynamically configured to a workstation from the DHCP request. It resolves the ip address of a server to it's name, so a client is not burdened by memorizing the ip address of every website.

In the cisco ios,  the "NO" command is used to negate other commands, so when a "no ip dns server" is used configured on a device, it stops every website name lookups.

3 0
4 years ago
Explain how any simple substitution cipher that involves a permutation of the alphabet can be thought of as a special case of th
Kaylis [27]

A simple substitution cipher takes each vector (e_i) and assigns it to the vectors [e_{\pi (i)}] in a one-to-one function so as to make them equivalent.

<h3>What is the Hill cipher?</h3>

In 1929, the Hill cipher was invented by Lester S. Hill and it can be described as a poly-graphic substitution cipher that is typically based on linear algebra and it avails a cryptographer an ability to simultaneously operate on more than three (3) symbols.

In Cryptography, the simple substitution cipher is usually viewed as a function which takes each plaintext letter (alphabet) and assigns it to a ciphertext letter. Thus, it takes each vector (e_i) and assigns it to the vectors [e_{\pi (i)}] in a one-to-one function so as to make them equivalent.

Read more on Hill cipher here: brainly.com/question/13155546

#SPJ1

6 0
2 years ago
In what ways is a mouse more efficient than a keyboard?
d1i1m1o1n [39]
It sometimes takes less effort to move the mouse than to press keys in the keyboard.

But the keyboard is often more efficient than the mouse. Keyboard shortcuts can be used to get tasks done in an instant, way faster than a mouse. Repetitive actions are also much easier.
5 0
4 years ago
Read 2 more answers
Write a function that accepts an argument for a persons name. The method should loop through the number of characters in the nam
MatroZZZ [7]

Answer:

#include <iostream>

#include<string.h>

using namespace std;

void printCharacter(string name){

   for(int i=0;name[i]!='\0';i++){

       cout<<name[i]<<endl;

   }

}

int main()

{

   string name;

   cout<<"enter the name: ";

   cin>>name;

   printCharacter(name);

}

Explanation:

first include the two libraries iostream for input/output and string library for using the string.

then, create the main function and declare the variable type string.

cout instruction is used o display the message on the screen.

cin is used to store the value in the name variable.

after that, call the function. The program control move to the the function. In the function for loop is used to print the character one by one until end of the name.

4 0
4 years ago
When designing a basic network, which of the following are factors to consider?
ivanzaharov [21]
The question answer is NUMBER B
8 0
3 years ago
Other questions:
  • Jose would like to know about his uncle's death. He feels his dad is avoiding the subject for some reason. Identify what Jose co
    5·1 answer
  • What do you think the need for so many different form factors and server types are?
    13·1 answer
  • Now for our sponsor Raid:Shadow legends
    8·2 answers
  • Write a C++ program to find if a given array of integers is sorted in a descending order. The program should print "SORTED" if t
    14·1 answer
  • In which genre of games do players most often have the power to shape how the story will end?
    12·2 answers
  • Variable index has a value of 4, and variable accessValid has a value of False. What value does variable, accessPoints, have aft
    7·1 answer
  • Suppose you and four of your friends are wirelessly connected with the home wireless router. [03] At this moment router is not t
    11·1 answer
  • What has global css rulesets of an angular 8 project mcq.
    8·1 answer
  • Question2.<br> What are the functions of information technology?
    8·1 answer
  • When an event occurs, the agent logs details regarding the event. what is this event called?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!