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
The _____ establishes that the destination device is present on the network, verifies active service, and informs the destinatio
masya89 [10]

Answer: Three way handshake

Explanation:

The three way handshake is the process in which it established a connection at the destination device in the network. It also verifies the currently active services in the network.

The three way shake process basically uses in the transmission control  protocol(TCP) and it also inform to the destination device about the communication session.

Three way handshake process are properly understand in the TCP segment header by the various values in the two host exchange.

4 0
3 years ago
One item you will NOT need to provide when opening up a bank account
gladu [14]

Answer:

You don't need a birth certificate

Explanation:

8 0
3 years ago
Read 2 more answers
What should not be compromised when trying to meet standards and deadlines?
n200080 [17]
A i believe is the answer
5 0
3 years ago
The gene form of a trait is called a(n) ​
Rom4ik [11]

Answer:

alleles

Explanation:

7 0
3 years ago
Which of the following represent features of free software licensing? Check all of the boxes that apply.
Iteru [2.4K]

Answer: A :is concerned with defending users’ freedom of use

C:makes source code available for editing

Explanation:

7 0
3 years ago
Other questions:
  • Write a program totake a depth (in kilometers) inside the earth as input data;compute
    15·1 answer
  • How to Print output in JavaScript
    8·1 answer
  • A car holds 16 gallons of gasoline and can travel 312 miles before refueling. Write aC++ program that calculates the number of m
    9·1 answer
  • Write a program that reads in the length and the width of a rectangular yard.
    5·1 answer
  • What does limited access to a document mean?
    14·2 answers
  • A laptop gets recycled by an e-waste recycling company once it can't be used anymore. Which stage of the hardware lifecycle does
    7·1 answer
  • When discussing the business requirements of a WLAN design, what is the first question that should be posed
    15·1 answer
  • A group of students is performing an investigation to measure how much liquid water is produced from a 10 L sample of snow. What
    6·1 answer
  • Justify any FOUR significant factors to remember when installing your motherboard
    7·1 answer
  • Which option is typically only used when utilizing self joins?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!