SlideShare una empresa de Scribd logo
1 de 1
Descargar para leer sin conexión
Instructions Write a class named Bill with the following specifications: - The class contains
three fields, one of type int named number, one of type String named name, and one of type
double named amount. - The class contains one constructor which has parameters for all fields.
The constructor should set the values of the fields to the values passed to its parameters. - The
class should contain another constructor which has only one parameter for the name field. The
constructor should set. the value of the name field to the value passed to its parameter. The
constructor should set the number field to 999 . The constructor should set the value of the
amount field to 0.0 . - The class contains get and set methods for each field. - The class contains
a toString() method that returns a String that contains information about the value of all fields.
Double values should be rounded to two decimal places. - The class contains a method named
calculateTax with return type double and one parameter of type double named percentage. The
method should return the value of the amount field multiplied by the value of percentage. Write
another class named TestBill with the following specifications: - The class contains a main()
method. - The class creates two Bill objects each using a different constructor. - The class uses
two System.out.printin() statements to print the objects without using the get methods. - The
class should prompt the user to enter a double value. - The class should save the user input in a
variable. - The class should call the calculateTax method for both objects, passing the value input
by the user to the method. - The class should print the results of the method calls to the screen.

Más contenido relacionado

Similar a Instructions Write a class named Bill with the following specificatio.pdf

© 2014 Laureate Education, Inc. Page 1 of 4 Retail Trans.docx
© 2014 Laureate Education, Inc.   Page 1 of 4 Retail Trans.docx© 2014 Laureate Education, Inc.   Page 1 of 4 Retail Trans.docx
© 2014 Laureate Education, Inc. Page 1 of 4 Retail Trans.docxLynellBull52
 
Assignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docxAssignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docxfaithxdunce63732
 
CIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaCIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaHamad Odhabi
 
Java programming lab assignments
Java programming lab assignments Java programming lab assignments
Java programming lab assignments rajni kaushal
 
JAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docxJAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docxLucky Ally
 
CS 192 test questions 1-441. Global variables are known to the e.docx
CS 192 test questions 1-441. Global variables are known to the e.docxCS 192 test questions 1-441. Global variables are known to the e.docx
CS 192 test questions 1-441. Global variables are known to the e.docxfaithxdunce63732
 
Lec 8 03_sept [compatibility mode]
Lec 8 03_sept [compatibility mode]Lec 8 03_sept [compatibility mode]
Lec 8 03_sept [compatibility mode]Palak Sanghani
 
Csc153 chapter 06
Csc153 chapter 06Csc153 chapter 06
Csc153 chapter 06PCC
 
EN3085 Assessed Coursework 1 1. Create a class Complex .docx
EN3085 Assessed Coursework 1  1. Create a class Complex .docxEN3085 Assessed Coursework 1  1. Create a class Complex .docx
EN3085 Assessed Coursework 1 1. Create a class Complex .docxgidmanmary
 

Similar a Instructions Write a class named Bill with the following specificatio.pdf (10)

© 2014 Laureate Education, Inc. Page 1 of 4 Retail Trans.docx
© 2014 Laureate Education, Inc.   Page 1 of 4 Retail Trans.docx© 2014 Laureate Education, Inc.   Page 1 of 4 Retail Trans.docx
© 2014 Laureate Education, Inc. Page 1 of 4 Retail Trans.docx
 
Assignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docxAssignment DetailsYou have learned that some markets are compet.docx
Assignment DetailsYou have learned that some markets are compet.docx
 
CIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in JavaCIS 1403 lab 3 functions and methods in Java
CIS 1403 lab 3 functions and methods in Java
 
Java programming lab assignments
Java programming lab assignments Java programming lab assignments
Java programming lab assignments
 
JAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docxJAVA practical Exam Questions (1).docx
JAVA practical Exam Questions (1).docx
 
CS 192 test questions 1-441. Global variables are known to the e.docx
CS 192 test questions 1-441. Global variables are known to the e.docxCS 192 test questions 1-441. Global variables are known to the e.docx
CS 192 test questions 1-441. Global variables are known to the e.docx
 
Java execise
Java execiseJava execise
Java execise
 
Lec 8 03_sept [compatibility mode]
Lec 8 03_sept [compatibility mode]Lec 8 03_sept [compatibility mode]
Lec 8 03_sept [compatibility mode]
 
Csc153 chapter 06
Csc153 chapter 06Csc153 chapter 06
Csc153 chapter 06
 
EN3085 Assessed Coursework 1 1. Create a class Complex .docx
EN3085 Assessed Coursework 1  1. Create a class Complex .docxEN3085 Assessed Coursework 1  1. Create a class Complex .docx
EN3085 Assessed Coursework 1 1. Create a class Complex .docx
 

Más de ALANKARSTEELINDUSTRI

Instructions Round your answers to the nearest whole number. a. Tota.pdf
 Instructions Round your answers to the nearest whole number. a. Tota.pdf Instructions Round your answers to the nearest whole number. a. Tota.pdf
Instructions Round your answers to the nearest whole number. a. Tota.pdfALANKARSTEELINDUSTRI
 
In XYZ company, employees are categorized by their job responsibili.pdf
 In XYZ company, employees are categorized by their job responsibili.pdf In XYZ company, employees are categorized by their job responsibili.pdf
In XYZ company, employees are categorized by their job responsibili.pdfALANKARSTEELINDUSTRI
 
In this procedure, youll trace the pathway of lymph flow from the st.pdf
 In this procedure, youll trace the pathway of lymph flow from the st.pdf In this procedure, youll trace the pathway of lymph flow from the st.pdf
In this procedure, youll trace the pathway of lymph flow from the st.pdfALANKARSTEELINDUSTRI
 
In the Solow growth model, the steady-state level of output per (effe.pdf
 In the Solow growth model, the steady-state level of output per (effe.pdf In the Solow growth model, the steady-state level of output per (effe.pdf
In the Solow growth model, the steady-state level of output per (effe.pdfALANKARSTEELINDUSTRI
 
In what ways did Volkswagen fulfill the requirements of effective cor.pdf
 In what ways did Volkswagen fulfill the requirements of effective cor.pdf In what ways did Volkswagen fulfill the requirements of effective cor.pdf
In what ways did Volkswagen fulfill the requirements of effective cor.pdfALANKARSTEELINDUSTRI
 
Incremental internationalization includes all of the following in det.pdf
 Incremental internationalization includes all of the following in det.pdf Incremental internationalization includes all of the following in det.pdf
Incremental internationalization includes all of the following in det.pdfALANKARSTEELINDUSTRI
 
In which of these circumstances is it advisable to use a POST request.pdf
 In which of these circumstances is it advisable to use a POST request.pdf In which of these circumstances is it advisable to use a POST request.pdf
In which of these circumstances is it advisable to use a POST request.pdfALANKARSTEELINDUSTRI
 
Input instructions values should be inputted using a Standard Englis.pdf
 Input instructions values should be inputted using a Standard Englis.pdf Input instructions values should be inputted using a Standard Englis.pdf
Input instructions values should be inputted using a Standard Englis.pdfALANKARSTEELINDUSTRI
 
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdfALANKARSTEELINDUSTRI
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdfALANKARSTEELINDUSTRI
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdfALANKARSTEELINDUSTRI
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdfALANKARSTEELINDUSTRI
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdfALANKARSTEELINDUSTRI
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdfALANKARSTEELINDUSTRI
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdfALANKARSTEELINDUSTRI
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdfALANKARSTEELINDUSTRI
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdfALANKARSTEELINDUSTRI
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdfALANKARSTEELINDUSTRI
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdfALANKARSTEELINDUSTRI
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdfALANKARSTEELINDUSTRI
 

Más de ALANKARSTEELINDUSTRI (20)

Instructions Round your answers to the nearest whole number. a. Tota.pdf
 Instructions Round your answers to the nearest whole number. a. Tota.pdf Instructions Round your answers to the nearest whole number. a. Tota.pdf
Instructions Round your answers to the nearest whole number. a. Tota.pdf
 
In XYZ company, employees are categorized by their job responsibili.pdf
 In XYZ company, employees are categorized by their job responsibili.pdf In XYZ company, employees are categorized by their job responsibili.pdf
In XYZ company, employees are categorized by their job responsibili.pdf
 
In this procedure, youll trace the pathway of lymph flow from the st.pdf
 In this procedure, youll trace the pathway of lymph flow from the st.pdf In this procedure, youll trace the pathway of lymph flow from the st.pdf
In this procedure, youll trace the pathway of lymph flow from the st.pdf
 
In the Solow growth model, the steady-state level of output per (effe.pdf
 In the Solow growth model, the steady-state level of output per (effe.pdf In the Solow growth model, the steady-state level of output per (effe.pdf
In the Solow growth model, the steady-state level of output per (effe.pdf
 
In what ways did Volkswagen fulfill the requirements of effective cor.pdf
 In what ways did Volkswagen fulfill the requirements of effective cor.pdf In what ways did Volkswagen fulfill the requirements of effective cor.pdf
In what ways did Volkswagen fulfill the requirements of effective cor.pdf
 
Incremental internationalization includes all of the following in det.pdf
 Incremental internationalization includes all of the following in det.pdf Incremental internationalization includes all of the following in det.pdf
Incremental internationalization includes all of the following in det.pdf
 
In which of these circumstances is it advisable to use a POST request.pdf
 In which of these circumstances is it advisable to use a POST request.pdf In which of these circumstances is it advisable to use a POST request.pdf
In which of these circumstances is it advisable to use a POST request.pdf
 
Input instructions values should be inputted using a Standard Englis.pdf
 Input instructions values should be inputted using a Standard Englis.pdf Input instructions values should be inputted using a Standard Englis.pdf
Input instructions values should be inputted using a Standard Englis.pdf
 
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 Inorganic phosphorous is a naturally occurring element in all plants .pdf Inorganic phosphorous is a naturally occurring element in all plants .pdf
Inorganic phosphorous is a naturally occurring element in all plants .pdf
 
information flows within your job. Find out 1. the chart of accounts.pdf
 information flows within your job. Find out 1. the chart of accounts.pdf information flows within your job. Find out 1. the chart of accounts.pdf
information flows within your job. Find out 1. the chart of accounts.pdf
 
Information about light in the outside world is used to tune the brai.pdf
 Information about light in the outside world is used to tune the brai.pdf Information about light in the outside world is used to tune the brai.pdf
Information about light in the outside world is used to tune the brai.pdf
 
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 Infection control 16. Chain of infection 17. Factors that increase ho.pdf Infection control 16. Chain of infection 17. Factors that increase ho.pdf
Infection control 16. Chain of infection 17. Factors that increase ho.pdf
 
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
In the textbook, you leamed about Hopi Hoekstra and colleagues who we.pdf
 
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 Larger raindrops fall than smaller raindrops. slower faster Questio.pdf Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
Larger raindrops fall than smaller raindrops. slower faster Questio.pdf
 
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
L0 254 P4-41A. (Learning Objectives 2, 4 Aggregating information for.pdf
 
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
Kozmo y Webvan eran dos servicios de entrega en l�nea que se decl.pdf
 
Komal borrows $14,000 from her father to open her accounting practice.pdf
 Komal borrows $14,000 from her father to open her accounting practice.pdf Komal borrows $14,000 from her father to open her accounting practice.pdf
Komal borrows $14,000 from her father to open her accounting practice.pdf
 
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
kites at filowi Corphite pets fa) Prough (4) Trepicutily ifou in nite.pdf
 
Kingbird Co. has the following defined benefit pension plan balances .pdf
 Kingbird Co. has the following defined benefit pension plan balances .pdf Kingbird Co. has the following defined benefit pension plan balances .pdf
Kingbird Co. has the following defined benefit pension plan balances .pdf
 
Kara categorized her spending for this month into four categories Re.pdf
 Kara categorized her spending for this month into four categories Re.pdf Kara categorized her spending for this month into four categories Re.pdf
Kara categorized her spending for this month into four categories Re.pdf
 

Último

ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6Vanessa Camilleri
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxDhatriParmar
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEPART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEMISSRITIMABIOLOGYEXP
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsArubSultan
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroomSamsung Business USA
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptxmary850239
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfChristalin Nelson
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 

Último (20)

ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6ICS 2208 Lecture Slide Notes for Topic 6
ICS 2208 Lecture Slide Notes for Topic 6
 
CARNAVAL COM MAGIA E EUFORIA _
CARNAVAL COM MAGIA E EUFORIA            _CARNAVAL COM MAGIA E EUFORIA            _
CARNAVAL COM MAGIA E EUFORIA _
 
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptxMan or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
Man or Manufactured_ Redefining Humanity Through Biopunk Narratives.pptx
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEPART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristics
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom6 ways Samsung’s Interactive Display powered by Android changes the classroom
6 ways Samsung’s Interactive Display powered by Android changes the classroom
 
Chi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical VariableChi-Square Test Non Parametric Test Categorical Variable
Chi-Square Test Non Parametric Test Categorical Variable
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx4.9.24 School Desegregation in Boston.pptx
4.9.24 School Desegregation in Boston.pptx
 
Indexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdfIndexing Structures in Database Management system.pdf
Indexing Structures in Database Management system.pdf
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 

Instructions Write a class named Bill with the following specificatio.pdf

  • 1. Instructions Write a class named Bill with the following specifications: - The class contains three fields, one of type int named number, one of type String named name, and one of type double named amount. - The class contains one constructor which has parameters for all fields. The constructor should set the values of the fields to the values passed to its parameters. - The class should contain another constructor which has only one parameter for the name field. The constructor should set. the value of the name field to the value passed to its parameter. The constructor should set the number field to 999 . The constructor should set the value of the amount field to 0.0 . - The class contains get and set methods for each field. - The class contains a toString() method that returns a String that contains information about the value of all fields. Double values should be rounded to two decimal places. - The class contains a method named calculateTax with return type double and one parameter of type double named percentage. The method should return the value of the amount field multiplied by the value of percentage. Write another class named TestBill with the following specifications: - The class contains a main() method. - The class creates two Bill objects each using a different constructor. - The class uses two System.out.printin() statements to print the objects without using the get methods. - The class should prompt the user to enter a double value. - The class should save the user input in a variable. - The class should call the calculateTax method for both objects, passing the value input by the user to the method. - The class should print the results of the method calls to the screen.