SlideShare a Scribd company logo
Write a java program using BlueJ: a) Create a class shop that contains 2 fields item of type String
and Price of type double. b) Define a constructor to set the item to biscuit and Price to 10.5
respectively. c) Define an Accessor method showDetails () to display the class data. Define a
Mutator method updatePrice( ) to change the price. d) Create 2 objects T 1 and T 2 of the class
and call its methods.

More Related Content

More from EvanadoJamesz

Which of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docxWhich of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docx
EvanadoJamesz
 
Which of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docxWhich of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docx
EvanadoJamesz
 
Which of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docxWhich of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docx
EvanadoJamesz
 
Which of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docxWhich of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docx
EvanadoJamesz
 
Which of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docxWhich of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docx
EvanadoJamesz
 
Which of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docxWhich of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docx
EvanadoJamesz
 
Which one is a block tag- A- epres B- h1- C- E-.docx
Which one is a block tag- A- epres B- h1- C-  E-.docxWhich one is a block tag- A- epres B- h1- C-  E-.docx
Which one is a block tag- A- epres B- h1- C- E-.docx
EvanadoJamesz
 
Which one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docxWhich one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docx
EvanadoJamesz
 
Write a java program using BlueJ- a) Create a class -Patient- with dat.docx
Write a java program using BlueJ- a) Create a class -Patient- with dat.docxWrite a java program using BlueJ- a) Create a class -Patient- with dat.docx
Write a java program using BlueJ- a) Create a class -Patient- with dat.docx
EvanadoJamesz
 
Write a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docxWrite a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docx
EvanadoJamesz
 
Write a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docxWrite a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docx
EvanadoJamesz
 
Write a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docxWrite a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docx
EvanadoJamesz
 
Write a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docxWrite a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docx
EvanadoJamesz
 
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docxWrite a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
EvanadoJamesz
 
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID-  The X c.docxWrite a bash shell named X that takes 2 arguments- F and PID-  The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
EvanadoJamesz
 
WRITE C++ recursive function PrintPattern2- to print following patter.docx
WRITE  C++ recursive function PrintPattern2- to print following patter.docxWRITE  C++ recursive function PrintPattern2- to print following patter.docx
WRITE C++ recursive function PrintPattern2- to print following patter.docx
EvanadoJamesz
 
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docxWhy does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
EvanadoJamesz
 
Would the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docxWould the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docx
EvanadoJamesz
 
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docxWorkplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
EvanadoJamesz
 
Write code in C++ Define a class called Wallet that represents numbe.docx
Write  code in C++  Define a class called Wallet that represents numbe.docxWrite  code in C++  Define a class called Wallet that represents numbe.docx
Write code in C++ Define a class called Wallet that represents numbe.docx
EvanadoJamesz
 

More from EvanadoJamesz (20)

Which of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docxWhich of the following statements about errors in cell division is fal.docx
Which of the following statements about errors in cell division is fal.docx
 
Which of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docxWhich of the following statements is most likely incorrect- Which of t.docx
Which of the following statements is most likely incorrect- Which of t.docx
 
Which of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docxWhich of the following statements is an accurate description of Newton.docx
Which of the following statements is an accurate description of Newton.docx
 
Which of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docxWhich of the following statements regarding endochondral ossification.docx
Which of the following statements regarding endochondral ossification.docx
 
Which of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docxWhich of the following programs multiply the contents of the D1 regist.docx
Which of the following programs multiply the contents of the D1 regist.docx
 
Which of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docxWhich of the following statements is true- Explain why each statement.docx
Which of the following statements is true- Explain why each statement.docx
 
Which one is a block tag- A- epres B- h1- C- E-.docx
Which one is a block tag- A- epres B- h1- C-  E-.docxWhich one is a block tag- A- epres B- h1- C-  E-.docx
Which one is a block tag- A- epres B- h1- C- E-.docx
 
Which one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docxWhich one is NOT a primary factor of an environmental assessment- Soci.docx
Which one is NOT a primary factor of an environmental assessment- Soci.docx
 
Write a java program using BlueJ- a) Create a class -Patient- with dat.docx
Write a java program using BlueJ- a) Create a class -Patient- with dat.docxWrite a java program using BlueJ- a) Create a class -Patient- with dat.docx
Write a java program using BlueJ- a) Create a class -Patient- with dat.docx
 
Write a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docxWrite a JAVA program with two classes- First class called Calclastname.docx
Write a JAVA program with two classes- First class called Calclastname.docx
 
Write a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docxWrite a Java method that takes two linked lists of integers- and and m.docx
Write a Java method that takes two linked lists of integers- and and m.docx
 
Write a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docxWrite a C++ program to create a class to throw separate exceptions on.docx
Write a C++ program to create a class to throw separate exceptions on.docx
 
Write a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docxWrite a code that defines an integer array of size 10- Initialize arra.docx
Write a code that defines an integer array of size 10- Initialize arra.docx
 
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docxWrite a C program that- Declares 2 structures to store a recipe 1- An.docx
Write a C program that- Declares 2 structures to store a recipe 1- An.docx
 
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID-  The X c.docxWrite a bash shell named X that takes 2 arguments- F and PID-  The X c.docx
Write a bash shell named X that takes 2 arguments- F and PID- The X c.docx
 
WRITE C++ recursive function PrintPattern2- to print following patter.docx
WRITE  C++ recursive function PrintPattern2- to print following patter.docxWRITE  C++ recursive function PrintPattern2- to print following patter.docx
WRITE C++ recursive function PrintPattern2- to print following patter.docx
 
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docxWhy does phenylalanine accumulate in patients with phenylketonuria- Th.docx
Why does phenylalanine accumulate in patients with phenylketonuria- Th.docx
 
Would the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docxWould the SPIN Selling technique increase your likelihood in securing.docx
Would the SPIN Selling technique increase your likelihood in securing.docx
 
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docxWorkplace Bullying- A Case for Business Leaders Workplace bullying is.docx
Workplace Bullying- A Case for Business Leaders Workplace bullying is.docx
 
Write code in C++ Define a class called Wallet that represents numbe.docx
Write  code in C++  Define a class called Wallet that represents numbe.docxWrite  code in C++  Define a class called Wallet that represents numbe.docx
Write code in C++ Define a class called Wallet that represents numbe.docx
 

Recently uploaded

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
JosvitaDsouza2
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
Jisc
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
Sandy Millin
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
Special education needs
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
Ashokrao Mane college of Pharmacy Peth-Vadgaon
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
Vikramjit Singh
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
beazzy04
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
RaedMohamed3
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
TechSoup
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
Excellence Foundation for South Sudan
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
Col Mukteshwar Prasad
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
Mohd Adib Abd Muin, Senior Lecturer at Universiti Utara Malaysia
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
Anna Sz.
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
AzmatAli747758
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
EduSkills OECD
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
DeeptiGupta154
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
bennyroshan06
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
Jisc
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
Celine George
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
kaushalkr1407
 

Recently uploaded (20)

1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx1.4 modern child centered education - mahatma gandhi-2.pptx
1.4 modern child centered education - mahatma gandhi-2.pptx
 
Supporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptxSupporting (UKRI) OA monographs at Salford.pptx
Supporting (UKRI) OA monographs at Salford.pptx
 
2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...2024.06.01 Introducing a competency framework for languag learning materials ...
2024.06.01 Introducing a competency framework for languag learning materials ...
 
special B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdfspecial B.ed 2nd year old paper_20240531.pdf
special B.ed 2nd year old paper_20240531.pdf
 
Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......Ethnobotany and Ethnopharmacology ......
Ethnobotany and Ethnopharmacology ......
 
Digital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and ResearchDigital Tools and AI for Teaching Learning and Research
Digital Tools and AI for Teaching Learning and Research
 
Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345Sha'Carri Richardson Presentation 202345
Sha'Carri Richardson Presentation 202345
 
Palestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptxPalestine last event orientationfvgnh .pptx
Palestine last event orientationfvgnh .pptx
 
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup   New Member Orientation and Q&A (May 2024).pdfWelcome to TechSoup   New Member Orientation and Q&A (May 2024).pdf
Welcome to TechSoup New Member Orientation and Q&A (May 2024).pdf
 
Introduction to Quality Improvement Essentials
Introduction to Quality Improvement EssentialsIntroduction to Quality Improvement Essentials
Introduction to Quality Improvement Essentials
 
How to Break the cycle of negative Thoughts
How to Break the cycle of negative ThoughtsHow to Break the cycle of negative Thoughts
How to Break the cycle of negative Thoughts
 
Chapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptxChapter 3 - Islamic Banking Products and Services.pptx
Chapter 3 - Islamic Banking Products and Services.pptx
 
Polish students' mobility in the Czech Republic
Polish students' mobility in the Czech RepublicPolish students' mobility in the Czech Republic
Polish students' mobility in the Czech Republic
 
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...Cambridge International AS  A Level Biology Coursebook - EBook (MaryFosbery J...
Cambridge International AS A Level Biology Coursebook - EBook (MaryFosbery J...
 
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptxStudents, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
Students, digital devices and success - Andreas Schleicher - 27 May 2024..pptx
 
Overview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with MechanismOverview on Edible Vaccine: Pros & Cons with Mechanism
Overview on Edible Vaccine: Pros & Cons with Mechanism
 
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptxMARUTI SUZUKI- A Successful Joint Venture in India.pptx
MARUTI SUZUKI- A Successful Joint Venture in India.pptx
 
The approach at University of Liverpool.pptx
The approach at University of Liverpool.pptxThe approach at University of Liverpool.pptx
The approach at University of Liverpool.pptx
 
How to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS ModuleHow to Split Bills in the Odoo 17 POS Module
How to Split Bills in the Odoo 17 POS Module
 
The Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdfThe Roman Empire A Historical Colossus.pdf
The Roman Empire A Historical Colossus.pdf
 

Write a java program using BlueJ- a) Create a class shop that contains.docx

  • 1. Write a java program using BlueJ: a) Create a class shop that contains 2 fields item of type String and Price of type double. b) Define a constructor to set the item to biscuit and Price to 10.5 respectively. c) Define an Accessor method showDetails () to display the class data. Define a Mutator method updatePrice( ) to change the price. d) Create 2 objects T 1 and T 2 of the class and call its methods.