JAVA Q1) class room practice-activity (class & object, methods) Create a class with the following details: Class name: BookDetails variables: bookld, bookName, price,netPrice methods: getData (), calculateTax () and showData () getData method allows to read input from the user. calculateTax () should calculate the tax and netprice on the book price. Netprice=price+tax NOTE: Tax is 0.5 rials Create a method showData () to display the values of the variables. Copy the solution code in notepad and upload in the elearning. Note: Add a comment in your code with your id and name

EBK JAVA PROGRAMMING
9th Edition
ISBN:9781337671385
Author:FARRELL
Publisher:FARRELL
Chapter5: Making Decisions
Section: Chapter Questions
Problem 8PE
icon
Related questions
Question

JAVA

Q1) class room practice-activity (class & object, methods)

Create a class with the following details: Class name: BookDetails variables: bookld, bookName, price,netPrice methods: getData (), calculateTax () and showData () getData method allows to read input from the user. calculateTax () should calculate the tax and netprice on the book price. Netprice=price+tax NOTE: Tax is 0.5 rials

Create a method showData () to display the values of the variables. Copy the solution code in notepad and upload in the elearning. Note: Add a comment in your code with your id and name.

Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Knowledge Booster
Class
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
EBK JAVA PROGRAMMING
EBK JAVA PROGRAMMING
Computer Science
ISBN:
9781337671385
Author:
FARRELL
Publisher:
CENGAGE LEARNING - CONSIGNMENT