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
A value chosen by the responder to identify a unique IKE SA is a _________.
Rina8888 [55]

Answer:

Responder SPI

Explanation:

Responder SPI : Cookie of an individual referring to an application from the SA organization, a message from the SA, or a delete from the SA.

6 0
3 years ago
Generate an array x that has n=100 random numbers that are uniformly distributed over the interval [0,1) . Look up how to use th
gladu [14]

Answer: np​.​random​.​uniform​(​0,​1,​100)

Explanation:

import numpy as np

#pass the random uniform generated array into x

x = np.random.uniform(low, high, size)

#here low = 0, high = 1, size = 100

x = no.random.uniform(0,1,100)

8 0
3 years ago
Marie can now edit her photos, send them in emails, print them on a printer, and use them as wallpaper on her computer. This is
AVprozaik [17]

I could be wrong, but I believe this one would be JPG files.

4 0
4 years ago
Read 2 more answers
B) Use an Excel function to find: Note: No need to use Excel TABLES to answer these questions! 6. The average viewer rating of a
nydimaria [60]

Answer:

Use the average function for viewer ratings

Use the min function for the earliest airing year

Explanation:

The average function gives the minimum value in a set of data

The min function gives the lowest value in a set of data

4 0
3 years ago
A(n)______is a database object used to customiz
Blizzard [7]

Answer:

option B report is the right answer

4 0
3 years ago
Other questions:
  • What is a relationship between a object and a class?
    6·1 answer
  • The difference between the various networks is the ______ of the coverage.
    11·2 answers
  • A hierarchical addressing scheme is used
    15·1 answer
  • 7. Which innovation in video games do you think has been most significant? Include at least one way that innovation affects the
    6·1 answer
  • John, the Network Administrator of XYZ Corporation, is interested in changing the format of text from American Standard Code for
    12·1 answer
  • Which of the following is a software application program?
    12·1 answer
  • What Information Technology is Walt Thomas responsible for?
    13·2 answers
  • The ____ code sets the style so that the web page element remains constant and does not move.
    11·1 answer
  • What is one advantage of using object-oriented programming?
    14·2 answers
  • During the morning of a website launch for a new government sponsored healthcare portal, an unknown political rival, individual,
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!