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
Say you write a program that makes use of the Random class, but you fail to include an import statement for java.util.Random (or
Levart [38]

Explanation:

you can find that question in social media

6 0
3 years ago
Robin has four copies of her midterm paper saved to a single folder on her
podryga [215]

Answer:

d

Explanation:

i took the test

6 0
3 years ago
What is the foundational domain for business
mr Goodwill [35]

a fundamental domain or fundamental region is a subset of the space which contains exactly one point from each of these orbits . It serves as a geometric realisation for the abstract set of representatives of the orbits . There are many ways to choose a fundamental domain .

hope this help

7 0
3 years ago
How do you activate the Slicer Tools contextual tab?
Strike441 [17]

Answer:

i need this one too

Explanation:

4 0
3 years ago
If a company doesn't distribute a computing use policy stating an employer's right to inspect employees' computers freely, inclu
tester [92]

Answer:

False

Explanation:

Without any police, a privacy can easily be compromised.

8 0
4 years ago
Other questions:
  • System requirements that are important in determining if a software program will work on a computer are ____.
    8·1 answer
  • When you select Insert and click on a shape the mouse pointer turns into a/an
    12·2 answers
  • How to construct a speaking library presentation database. How will you use this library and database in the furture? Based on w
    10·1 answer
  • Which types of files are saved with the .mp3 and .zip extensions?
    12·2 answers
  • What is the most likely reason that a digital artist would use a program such as Autodesk Maya or Max to create 3-D images for a
    12·1 answer
  • JAVA
    12·1 answer
  • What happen if file server stops working?
    5·1 answer
  • Write the corresponding Python assignment statements:
    13·1 answer
  • It is recommended that systems administrators analyze logs in order to determine if they have been altered because monitoring ca
    14·1 answer
  • A ____ risk assessment evaluates threats to and vulnerabilities of the network.
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!