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
Write a program that allows a user to input words at the command line. Your program should stop accepting words when the user en
vladimir1956 [14]
Hey How are you fine?
3 0
4 years ago
Byte pair encoding is a data encoding technique. The encoding algorithm looks for pairs of characters that appear in the string
erica [24]

Answer:

C. Byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.

Explanation:

Byte pair encoding is a form of encoding in which the most common pairs of consecutive bytes of data are replaced by a single byte which does not occur within the set of data.

For example, if we has a string ZZaaAb, it can be encoded if the pairs of string ZZ are replaced by X and the second pair by Y. So, our data now becomes XYAb.

To get our original data, that is decode it, we just replace the data with the keys X = ZZ and Y = aa thus allowing our original data to be restored.

Since our original string is restored without loss of data, it implies that <u>byte pair encoding is an example of a lossless transformation because an encoded string can be restored to its original version.</u>

8 0
3 years ago
Go follow me plz i would appreciate it
aleksandr82 [10.1K]
Hejdjxuxudjjdjdbdbdbd
6 0
3 years ago
Read 2 more answers
Can a syntax error occur in a block-based code? Why or why not?
grin007 [14]

Answer:

Syntax errors are not able to occur in block based code, so they cannot be transitioned from block to text and can cause issues.

8 0
4 years ago
Read 2 more answers
What type algorithm can solve the problem of routing an email message along the shortest possible path through intermediate comp
allochka39001 [22]

Answer:

Exponential.

Explanation:

The router is a network device that route packets to its destination through a path on its routing table. The routing table contains the path to the next hop count of the destination network. A path or route could be learnt statically or dynamically.

Static routes are learnt based on direct connection to other router or a hard coded path configuration. A dynamic route is learnt through a routing protocol. RIP, EIGRP, OSPF, IS-IS are examples of routing protocols.

The OSPF or open shortest path first is a protocol that uses algorithm, load cost and other metrics to determine paths for packets. The exponential algorithm is used by the OSPF to determine the shortest and noise-free path to a destination.

4 0
3 years ago
Other questions:
  • Attacker player X is standing still on a corner kick, as the ball is played, he jumps up with his arms flailing above his should
    8·1 answer
  • Find the maximum value and minimum value in milesTracker. Assign the maximum value to maxMiles, and the minimum value to minMile
    9·1 answer
  • What change does NOT need to be made to the above cover letter excerpt before sending it to an employer? a. Remove background co
    6·2 answers
  • Write, compile, and execute a C program that calculates and returns the fourth root of the number 81.0, which is 3. (hint: The f
    6·1 answer
  • Samantha was calculating a mathematical formula on an electronic spreadsheet. She used multiple values to recalculate the formul
    7·2 answers
  • Little circles located in front of various website screen options, which can be selected with the mouse, are called ________.
    6·1 answer
  • Carbon monoxide poisoning can result from breathing
    15·1 answer
  • Which of the following happens when you enter the formula =G15 into a cell?
    12·1 answer
  • Computers are able to think like human beings true or false?
    10·1 answer
  • Write a program that prompts the user to input an integer and then outputs both the individual digits of the number and the sum
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!