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
sweet [91]
1 year ago
8

Given the following class, Book, Write code for the following:

Computers and Technology
1 answer:
Yuri [45]1 year ago
7 0

Using the knowledge in computational language in JAVA it is possible to write a code that can organize the books in price and author classes.

<h3>Writing the code in JAVA we have:</h3>

<em>class Book{</em>

<em>    private int price;</em>

<em>    private String author;</em>

<em>    public Book(int p){</em>

<em>        price=p;</em>

<em>    }</em>

<em>    public Book(Book b){</em>

<em>        price=b.price;</em>

<em>        author=b.author;</em>

<em>    }</em>

<em>    public int getPrice(){</em>

<em>        return price;</em>

<em>    }</em>

<em>    public void setAuthor(String a){</em>

<em>        author=a;</em>

<em>    }</em>

<em>    public String toString(){</em>

<em>        return author+" "+Integer.toString(price);</em>

<em>    }</em>

<em>}</em>

<em>public class Main</em>

<em>{</em>

<em> public static void main(String[] args) {</em>

<em>     Book b=new Book(450);</em>

<em>     b.setAuthor("Jack");</em>

<em>     Book b1=new Book(b);</em>

<em>     System.out.println(b1.toString());</em>

<em> }</em>

<em>}</em>

See more about JAVA at brainly.com/question/18502436

#SPJ1

You might be interested in
When you use an external style sheet with an HTML document, you get all but one of the benefits that follows. Which one is NOT a
Oliga [24]

Answer:

Until external style sheet is not loaded the document may not be rendered.

Explanation:

Rendering is taking the HTML code and interpreting it into what we see on the screen.This may not be possible if we are using an external style sheet and it is not loaded fully.This is biggest disadvantage of using external style sheet.

6 0
3 years ago
Sharon's company has written a new computer program, and she has been asked to find a way to prevent people from copying the sof
Tasya [4]

Answer:

Sharon's company has written a new computer program, and she has been asked to find a way to prevent people from copying the software they purchase and giving it to others who have not purchased the software. What can Sharon's company do to make sure a customer who p…

A:

Use DRM.

Explanation:

Use DRM.

8 0
2 years ago
A corporate or government network that uses Internet tools, such as Web browsers, and
Alchen [17]

Answer: Intranet

Explanation:

The options include:

A. extranet.

B) social network.

C) intranet.

D) e-market.

A corporate or government network that uses Internet tools, such as Web browsers, and Internet protocols is referred to as intranet.

Social networks are social media sites that are used by people which allows them to stay connected with one another.

E-market is a form of marketing whereby goods and services are promoted or advertised through the use of the internet.

Therefore, the answer to he above question is intranet.

3 0
3 years ago
I’ll mark brainliest if correct
aliya0001 [1]

Answer:

I believe the answer is B

Explanation:

5 0
3 years ago
Sam works in a real estate office. An offer comes in on a house but the homeowners are on vacation. He needs the homeowners to s
Digiron [165]

Answer:

Sam should send a digital document and request a signature. The could be fax or even an image printed out, if neither is possible get in contact with eh owner and his lawyer for more help.

Explanation:

3 0
3 years ago
Other questions:
  • Ana works in the medical records department at a large medical office. Her job includes scanning and uploading medical records i
    15·1 answer
  • Which protocol is often used to publish web pages to a web server?
    5·1 answer
  • You can clear a log file simply by redirecting nothing into it. true or false?
    13·1 answer
  • Why do some people think the global<br> economy is good for the United States?
    10·1 answer
  • Three of the most important jobs of security management are to ensure _____ are organized according to sensitivity, ensure that
    10·1 answer
  • How to use repl.it css
    7·1 answer
  • If you were required to give a speech identifying the risks of using computers and digital devices, which group of items would y
    7·1 answer
  • Xavier wants to print the slides of his PowerPoint presentation to practice and make notes but doesn't want to use too much ink
    5·2 answers
  • Which is a linear presentation?
    10·1 answer
  • Where to get industrial circuits far cry 6
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!