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 addresses a program may use to reference memory are distinguished from the addresses the memory system uses to identify phys
antiseptic1488 [7]
I can answer this but I need to know if it is a question because theres no question mark
8 0
3 years ago
Which model works on the idea that advertising motivates people to think about the message, feel something about the product, an
Ganezh [65]

Answer:

D. Think-Feel-Do Model

Explanation:

The Think-Feel-Do Model or simply just TFD model is a marketing model used by marketers to engage their target customers.

THINK - Involves the marketers having an insights into the target customer's needs that are important.

FEEL - Understanding the target customers basic drive. It involves inbound and outbound marketing communications.

DO - This involves the creation of marketing materials to be used in targeting the target customers for the products/services.

7 0
3 years ago
What are 3 ways to get friends to stop texting and driving?
Leni [432]
Not allow them to use their phone, tell them you won’t get in the car with them unless they stop texting and driving, inform their parents
3 0
3 years ago
Read 2 more answers
What is the name for the strip of frequently used icons on a computer? O App O Program O Toolbar O Utilities panel ILL MARK YOU
liubo4ka [24]

Answer: The name of the strip is the Toolbar.

7 0
3 years ago
Read 2 more answers
Which statement is used to assign value to a variable?
Romashka [77]

Answer:

the "=" sign is used to assign value to a variable. Example:


int number = 25;

You are basically assigning the value '25' to a variable of type 'integer' called 'number'.

Explanation:

3 0
2 years ago
Other questions:
  • To get revenge on the pizza parlor burning his pizza and not reimbursing him for it, David returned to the pizza parlor after-ho
    9·2 answers
  • Create a SavingsAccount class. Use a static data member annualInterestRate to store the annual interest rate for each of the sav
    10·1 answer
  • If a website ends with .gov does it mean that its written by the government or?
    11·2 answers
  • A sense of scale tells us what about the objects in a picture?
    11·2 answers
  • My monitor is a 60hz, and i overclocked it to 80hz. The max it will go is to 85hz, but i left it at 80hz. Will it damage my moni
    11·1 answer
  • Which term collectively describes hard disks, CDs, and flash drives?
    11·2 answers
  • PLEASE HELP!
    14·2 answers
  • What is incorrect about the following code? Suggest a possible revision of the code to correct the error.
    13·1 answer
  • What is the answer ??​
    5·2 answers
  • What would be an ideal scenario for using edge computing solutions?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!