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
Ainat [17]
3 years ago
9

Write a class named Book containing: Two instance variables named title and author of type String. A constructor that accepts tw

o String parameters. The value of the first is used to initialize the value of title and the value of the second is used to initialize author. A method named toString that accepts no parameters. toString returns a String consisting of the value of title, followed by a newline character, followed by the value of author.
Computers and Technology
1 answer:
andrey2020 [161]3 years ago
3 0

Answer:

The code to this question can be given as:

Code:

public class Book  //define class.  

{

private String title, author;   //define variable.

Book(String a, String b)  //define parameterized constructor.

{

title = a;   //holding value.

author = b;

}

public String toString()  //string function

{

return title + "\n" + author;    //return value.

}

}

Explanation:

In the above java code firstly we declare the class book that name is already given in the question. Then we declare the private variable that datatype is string author and title. Then we declare the parameterized constructor. In the parameterized constructor we use the private variable for hold constructor parameter value. Then we declare the tostring() function in this function we return value of the title and author variable.

You might be interested in
You are an IT technician at your company. The company has two small offices in different cities. The company's head office conta
Vesna [10]

The IT technician can configure DHCP and provide a static IP address a on the user’s computer.

Further explanation:

We have a case of one office containing a DHCP server and another one does not. A DHCP server assigns IPs to client machines and relies on DHCP protocol. By default, a DHCP server usually assigns clients in a network dynamic IPs. However, in this case scenario, since the head office contains a DHCP server, the IT technician is required to configure the general tab of the IPV4 network settings of the user’s machine to use the DHCP server. Configuring DHCP on client’s machine will ensure that the user will gain access to the network’s resources every time he is in head office.

A machine is built to check for alternate IP addresses if a DHCP server is absent. Therefore, to ensure that this user is always connected, the technician should also configure static IPs in the alternate configuration tab of IPV4 settings so that he will be able to connect to the branch office. Note that the static IP should be configured within the IP range of the branch office and not of the DHCP server.

In conclusion, you should avoid configuring a static IP on both the general and the alternate configuration tab for the branch office network. Doing so will restrict the user from accessing an established network while at the head office. The same case goes to the head office. Therefore, the technician should configure DHCP's general tab to be used in head office and static IPs on the alternate configuration tab to be used in the branch office.

Learn more about DHCP

brainly.com/question/10595289

#LearnWithBrainly

6 0
3 years ago
O O O O O O O
Masja [62]

Answer:

writing a comprehensive business plan

researching competition for a business idea

becoming an entrepreneur and desiring to have a manager

pursuing various funding options

seeking a profession that is stable and secure

8 0
3 years ago
What kind of heat we feel from the sun
ivolga24 [154]

Is it solar heat? ultraviolet heat? UV?
6 0
3 years ago
Read 2 more answers
PLZZZ HELP!!! I’ll give brainliest
prohojiy [21]

Answer:

The ability of a firm to improve contribution margins (revenue-variable costs) as its sales volume increases. Infinite scalability can occur only when the variable cost of serving an additional customer is zero.

Explanation:

The best that I can do

Hope this helps : )

3 0
3 years ago
Globalization is based on <br>​
Blababa [14]

Answer:

the growing interdependence of the world's economies.

Explanation:

it's of all the cultures and populations that crossed the border by trading

5 0
3 years ago
Other questions:
  • Behaving in an acceptable manner within a workplace environment is referred to as having
    9·1 answer
  • The main benefit of encryption of a hard drive is to make part of an ROI report.
    15·1 answer
  • All users on the network have antivirus software; however, several users report that they have what an administrator described a
    10·1 answer
  • How are a cell's content and format related?
    12·2 answers
  • Data ____ travel over the Internet from router to router until reaching their destinations.
    7·1 answer
  • If a user inserts a piece of clip art over some text but does not want the art to block the text, the user should select
    14·2 answers
  • There is a renewed focus among today’s parents on providing food to their family.
    6·1 answer
  • How are comments in a Java program treated by the compiler?
    14·2 answers
  • The computer scientists Richard Conway and David Gries once wrote: The absence of error messages during translation of a compute
    7·1 answer
  • How do you initiate a sprite’s actions in a scene?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!