Define a class named person that contains two instance variables of type string that stores the first name and last name of a person and appropriate accessor and mutator methods. Also create a method named displayDetails that outputs the details of a person

Answers

Answer 1

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()

}

}


Related Questions

what security issues could result if a computer virus or malware modifies your host file in order to map a hostname to another IP address

Answers

Answer:

Man-in-the-middle attack

Explanation:

In this type of attack, the hacker uses the virus or malware to get and change his IP address and hostname to match the address and hostname of the target host computer. The allows the hacker to gain access to information sent to the target IP address first.

The illegal copying of program​

Answers

Answer:Software piracy

Explanation:

draw internal architecture of computer​

Answers

Answer:

If this is good, let me know in the comments and I'll draw it

Explanation:

what type of device is a projector ?
a. input
b. memory
c. output
d. storage

Answers

Answer:

output

Explanation:

if I'm wrong sorryyy

Answer:

Output

Explanation:

:D

Write a list comprehension statement to generate a list of all pairs of odd posi

Answers

Answer:

Print([(a,b) for a in range(10) for b in range(10) if (a < b and a%2 == 1 and b%2 == 1)])

Explanation:

Here, we declared a range of value for a and b using a for loop and the range function. The values are the first 10 numeric digits. The we used the if statement to establish our constraints;

In other to ensure that ;

Lower digit is written first ; (a < b) ;

Only odd numbers are considered,

a%2 == 1 ; b%2 == 1 (remainder when a and b are divided by 2 is 1.

Both a and b are declared as a tuple in other to obtain a pair of odd values.

please help me



Match the technology with the appropriate task.



1. graphics software

2. word processor

3. CAD

4. laptop

5. GPS​

Answers

Complete Question:

Match the technology with the appropriate task.

Column A

1. Graphics software

2. Word processor

3. CAD

4. Laptop

5. GPS

Column B

A. Create a company logo.

B. Get directions to a customer’s office.

C. Type a report.

D. Complete many types of tasks on a computer away from the office.

E. Design a building.

Answer:

1. A

2. C

3. E

4. D

5. B

Explanation:

1. Graphics software: it can be used to create a company logo. Some examples of software applications or programs are Adobe photoshop, Core-draw, illustrator etc.

2. Word processor: it is typically used for typing a text-based document. For instance, type a report. Some examples are notepad, Microsoft Word, etc.

3. CAD: design a building. CAD is an acronym for computer aided design used for designing the graphical representation of a building plan. An example is Auto-CAD.

4. Laptop: complete many types of tasks on a computer away from the office. A laptop is compact and movable, so it can be easily used in any location.

5. GPS: directions to a customer’s office. GPS is an acronym for global positioning system and it is typically used for locating points and directions of a place.

Answer:

1. A

2. C

3. E

4. D

5. B

Problem decomposition means
O Fixing the problem
O Solving the problem
O Breaking down tasks into smaller, manageable parts
0 None of the above
PLEASE HELPPPPPP

Answers

Answer: Breaking down tasks into smaller, manageable parts

Explanation:

The word decomposition means to break down so Problem decomposition means to break down the problem being faces into smaller parts with the reason being to be able to manage it better.

Some problems are simply too large to handle singularly because of the amount of resources that would have to be devoted. It would be better to break them down into smaller tasks that can then be be confronted one at a time with enough resources to solve them each.

Other Questions
Write any three differences between mass and weight please its aurgent fast Question 6A machine is used to fill bags with a popular brand of trail mix. The machine is calibrated so the distribution of the weights of the bags of trail mix is normal,with mean 240 grams and standard deviation 3 grams. Of the following, which is the least weight of a bag in the top 5 percent of the distribution? a. The sum of a number and one is equal to one added to the number. Brian has reduced his cholesterol level by 13% after his last check up. If his original level was 240, what is his approximate cholesterol level now? HELP PLEASEThe Neolithic period is categorized by...A hunting and gathering foodhunting and the B domestication of the dogC domestication of plants and animalsD attribution of magical properties I don't understand the way they've arranged the statement... 3 + 7 Is whatA) 10B) 18C) 37 32. The price of a box of tarts is $1 cheaper than that of a loaf of bread. If 3 times the price of aloaf of bread is $29.5 more than half of the price of a box of tarts, find the price of a box oftarts.A. $4.3B. $7.7C. $9.84D. $13 Help! Help!___ are a primary way to discourage drinking and driving.A. High prices for alcoholB. Scare tacticsC. Laws PLZ PLZ PLZ HELP MEEEE c. Explain one factor that could account for wom en's illiteracy in certain parts of the world. A sports store marks up t shirts it sells by 60% if the store bought a t shirt for 6.25 what will be the retail price Percent is always out of _________ ? Without another word, the very disappointed customer laid the money on the counter and left the store. He had learned not only that he who squanders his own time is foolish, but that he who wastes the time of others is a thief.Which summarizes the selection?A. A customer insisted on arguing about the price of a book with the owner, caring little for the interruption he caused.B. A customer spent a great deal of time browsing in a bookstore and then insisted on seeing Franklin. C. A customer thought the owner of the bookstore would give him a better price than the clerk. D. A customer learned that Franklin valued his time more than he valued customer satisfaction. What is the solution to the system of equations graphed below? Help me please with science What is 4.35 divided by 2.5? Which statement reveals a change in Creon's character?you won't change my mind to make yourself more rich.The tribe of prophets-all of them-are fond of money.You're a wise prophet,/but you love doing wrong.Until one dies the best thing well may be to follow our established laws. What are the categories that forest ecologists use to group trees?A)dominant, codominant, tridominant, and quaddominantB)high, intermediate, low, groundC)dominant, codominant, intermediate, suppressedD)high, low, ground, and sublevel Does immigration have a mostly positive or negative impact on the U.S. and why?