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
Write a program that get
densk [106]

Answer:

people = list(map(int, input().split()))  # gets input and makes them into an integer

for i in range(len(people)):

   if 0 <= people[i] <= 5:

       print('Baby')  # You didn't specify how you want to 'store' the info, but I'm just going to print it out

   elif 6 <= people[i] <= 17:

       print('Teen')

   elif 18 <= people[i]:

       print('Adults')

Explanation:

This is the basic structure of the code. This is written in Python 3x. If you are writing in a different language, then just use the template given to you!

5 0
3 years ago
If you have two tasks x and y, with y being a successor to x, if we mark x as undone (because it needs to be redone for some rea
Ierofanga [76]

Answer:

idk

Explanation:

sorry

7 0
3 years ago
Windows displays a(n)
pochemuha

Answer:

system I hope tis is right

7 0
3 years ago
We learned that an ideal multiple access protocol has FOUR desirable
Nataly [62]

Answer:

We learned that an ideal multiple access protocol has FOUR desirable

characteristics, describe them.

Explanation:

1.- Very experienced technology and easy to implement.

2.- Rigid resource management and unfit for variable traffic flows.

3.- Requires antenna duplexer for duplex transmission.

<u>Duplex</u> <em>is a term used in telecommunication to define a system that is capable of maintaining two-way communication, sending and receiving messages simultaneously. </em>

4.- Normally FDMA is combined with multiplexing FDD.

<u>FDMA</u> (acronym in English for Frequency Division Multiple Access) <em>is a multiplexing technique used in multiple communication protocols, both digital and analog, mainly radio frequency, and among them in mobile phones of GSM networks. </em>

<u>FDD</u> (Frequency Division Duplexing in English) <em>designates a duplex method in the environment of wireless telecommunications and over certain wired networks.</em>

4 0
4 years ago
Suppose that you want to write a program that inputs customer data including name, zipCode, balance, and regionNum. At the end o
Sergio039 [100]

The most likely statement during the main processing loop would be

customerCount[regionNum] =

customerCount[regionNum] + 1

<h3>What is a processing loop?</h3>

A loop means a sequence of instruction s that is continually repeated until a certain condition is reached.

In this case, the most likely statement during the main processing loop would be customerCount[regionNum] = and customerCount[regionNum] + 1.

Learn more about loop on:

brainly.com/question/4510147

#SPJ12

4 0
2 years ago
Other questions:
  • How to tell if screen or screen protector is cracked?
    5·2 answers
  • Nonvolatile in the context of data storage means ________________. a. the data can't be changed in a data warehouse. b. the data
    11·1 answer
  • Describe how the spoofing attack can affect multiple network layers (application, transport, network, and data link layers).
    14·1 answer
  • What are the constraints for designing small and large files and how these are resolved in different file system
    7·1 answer
  • You are setting up a RAID system in a server designed for optimum fault tolerance, accuracy, and minimal downtime. Which HDD is
    7·1 answer
  • In the terms of OOP, in the microwave system, current time is a BLANK and change heat is a BLANK
    15·1 answer
  • When using the Simple Query Wizard, Kirsten wanted to transfer all of her available data to a new table. She should click
    14·1 answer
  • Host to IP address lookup and its reverse lookup option are very important network services for any size network. It is also how
    9·1 answer
  • Which of the following numbers is of type
    6·1 answer
  • Select 3 true statements about Python class.
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!