Programming 1 IA 01. Create a Java class called GameCharacterthat .pdf

Programming 1 IA 01. Create a Java class called GameCharacterthat hasthe following attrbutes: The class should have the following methods: getName(): This method should return the name of the character. setName(String name): This method should set the name of the character. getHitPoints(): This method should return the current hit points of the character, setHitPoints(int hitPoints): This method should set the hit points of the character getDamagePoints: This method should return the damage points of the character. setDamagePoints (int damagePoints): This method should set the damage points of the character. attack(GameCharacter character): This method should subtract the character's damage points from the target character's hit points. Create a Player class that extends the Game Character class and has the following attributes: level (an integer) experiencePoints (an integer) The class should have the following methods: Create an Enemy class that extends the Came Character lass and has the following attributes: The class should have the following methods; from the enemy's hit points and print a message indicating how much damage was dealt. In the Main class, create a Player object and an Enemy object, set their attributes, and have them attack each other until one of them has no more hit points. Print a message indicating which character won the fight. Q2. Using Python, create an abstract class called BankAccountwith the following attributes and Create two classes called CheckingAccount and SavingsAccountthat inherit from BankAccount. The CheckingAccount class should have a method called withdraw that allows the account holder to Withdraw money, but charges a transaction fee of GHS 0.50 per withdrawal. The SavingsAccount class should have a method called withdraw that allows the account holder to withdraw money, but only if there is sufficient balance in the account. Q3. Create a PHP class called "StudentRegistration" with the following properties: The class should have the following methods: Create a new instance of the "StudentRegistration" class and set its properties to some values Then, use the "setStudentName()", "setRegistrationDate()", "getStudentName()" "getRegistrationDate()", and "daysSinceRegistration()" methods to perform some operations and print out the results..

Programming 1 IA
01. Create a Java class called GameCharacterthat hasthe following attrbutes:
The class should have the following methods:
getName(): This method should return the name of the character.
setName(String name): This method should set the name of the character.
getHitPoints(): This method should return the current hit points of the character,
setHitPoints(int hitPoints): This method should set the hit points of the character
getDamagePoints: This method should return the damage points of the character.
setDamagePoints (int damagePoints): This method should set the damage points of the
character.
attack(GameCharacter character): This method should subtract the character's damage
points from the target character's hit points.
Create a Player class that extends the Game Character class and has the following attributes:
level (an integer)
experiencePoints (an integer)
The class should have the following methods:
Create an Enemy class that extends the Came Character lass and has the following
attributes:
The class should have the following methods;
from the enemy's hit points and print a message indicating how much damage was
dealt.
In the Main class, create a Player object and an Enemy object, set their attributes, and have
them attack each other until one of them has no more hit points. Print a message indicating
which character won the fight.
Q2. Using Python, create an abstract class called BankAccountwith the following attributes and
Create two classes called CheckingAccount and SavingsAccountthat inherit from BankAccount.
The
CheckingAccount class should have a method called withdraw that allows the account holder to
Withdraw money, but charges a transaction fee of GHS 0.50 per withdrawal. The
SavingsAccount
class should have a method called withdraw that allows the account holder to withdraw money,
but
only if there is sufficient balance in the account.
Q3. Create a PHP class called "StudentRegistration" with the following properties:
The class should have the following methods:
Create a new instance of the "StudentRegistration" class and set its properties to some values
Then, use the "setStudentName()",
"setRegistrationDate()", "getStudentName()"
"getRegistrationDate()", and "daysSinceRegistration()" methods to perform some operations
and print out the results.

Recomendados

Write a Python class definition for an Employee object that contains t.docx von
Write a Python class definition for an Employee object that contains t.docxWrite a Python class definition for an Employee object that contains t.docx
Write a Python class definition for an Employee object that contains t.docxnoreendchesterton753
2 views3 Folien
Object Oriented Programming Assignment 2 von
Object Oriented Programming Assignment 2Object Oriented Programming Assignment 2
Object Oriented Programming Assignment 2Kasun Ranga Wijeweera
1.1K views3 Folien
Im looking for some help in Java Here is the assignment an.pdf von
Im looking for some help in Java Here is the assignment an.pdfIm looking for some help in Java Here is the assignment an.pdf
Im looking for some help in Java Here is the assignment an.pdfabibagschennai
13 views4 Folien
Lab exam question_paper von
Lab exam question_paperLab exam question_paper
Lab exam question_paperKuntal Bhowmick
30 views6 Folien
21: Which method determines if a JRadioButton is selected? von
21: Which method determines if a JRadioButton is selected?21: Which method determines if a JRadioButton is selected?
21: Which method determines if a JRadioButton is selected?sukeshsuresh189
302 views6 Folien
6: Which of the following statements about creating arrays and initializing t... von
6: Which of the following statements about creating arrays and initializing t...6: Which of the following statements about creating arrays and initializing t...
6: Which of the following statements about creating arrays and initializing t...sukeshsuresh189
386 views6 Folien

Más contenido relacionado

Similar a Programming 1 IA 01. Create a Java class called GameCharacterthat .pdf

22: The logical relationship between radio buttons is maintained by objects o... von
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...sukeshsuresh189
570 views6 Folien
19: When the user presses Enter in a JTextField, the GUI component generates ... von
19: When the user presses Enter in a JTextField, the GUI component generates ...19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...sukeshsuresh189
1.5K views6 Folien
5: Every Java application is required to have von
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to havesukeshsuresh189
383 views6 Folien
15: Which method call converts the value in variable stringVariable to an int... von
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...sukeshsuresh189
346 views6 Folien
3: A(n) ________ enables a program to read data from the user. von
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.sukeshsuresh189
1.2K views6 Folien
17: provides the basic attributes and behaviors of a window—a title bar at th... von
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...sukeshsuresh189
590 views6 Folien

Similar a Programming 1 IA 01. Create a Java class called GameCharacterthat .pdf(20)

22: The logical relationship between radio buttons is maintained by objects o... von sukeshsuresh189
22: The logical relationship between radio buttons is maintained by objects o...22: The logical relationship between radio buttons is maintained by objects o...
22: The logical relationship between radio buttons is maintained by objects o...
sukeshsuresh189570 views
19: When the user presses Enter in a JTextField, the GUI component generates ... von sukeshsuresh189
19: When the user presses Enter in a JTextField, the GUI component generates ...19: When the user presses Enter in a JTextField, the GUI component generates ...
19: When the user presses Enter in a JTextField, the GUI component generates ...
sukeshsuresh1891.5K views
5: Every Java application is required to have von sukeshsuresh189
5: Every Java application is required to have5: Every Java application is required to have
5: Every Java application is required to have
sukeshsuresh189383 views
15: Which method call converts the value in variable stringVariable to an int... von sukeshsuresh189
15: Which method call converts the value in variable stringVariable to an int...15: Which method call converts the value in variable stringVariable to an int...
15: Which method call converts the value in variable stringVariable to an int...
sukeshsuresh189346 views
3: A(n) ________ enables a program to read data from the user. von sukeshsuresh189
3: A(n) ________ enables a program to read data from the user.3: A(n) ________ enables a program to read data from the user.
3: A(n) ________ enables a program to read data from the user.
sukeshsuresh1891.2K views
17: provides the basic attributes and behaviors of a window—a title bar at th... von sukeshsuresh189
17: provides the basic attributes and behaviors of a window—a title bar at th...17: provides the basic attributes and behaviors of a window—a title bar at th...
17: provides the basic attributes and behaviors of a window—a title bar at th...
sukeshsuresh189590 views
18: Which of the following does not generate an event? von sukeshsuresh189
18: Which of the following does not generate an event?18: Which of the following does not generate an event?
18: Which of the following does not generate an event?
sukeshsuresh189334 views
12: When an object is concatenated with a String von sukeshsuresh189
12: When an object is concatenated with a String12: When an object is concatenated with a String
12: When an object is concatenated with a String
sukeshsuresh1891.3K views
16: Which of the following is the method used to display a dialog box to gath... von sukeshsuresh189
16: Which of the following is the method used to display a dialog box to gath...16: Which of the following is the method used to display a dialog box to gath...
16: Which of the following is the method used to display a dialog box to gath...
sukeshsuresh1891K views
10: In the Java graphics system, coordinate units are measured in ________. von sukeshsuresh189
10: In the Java graphics system, coordinate units are measured in ________.10: In the Java graphics system, coordinate units are measured in ________.
10: In the Java graphics system, coordinate units are measured in ________.
sukeshsuresh189573 views
7: Assume the following class declaration. von sukeshsuresh189
7: Assume the following class declaration.7: Assume the following class declaration.
7: Assume the following class declaration.
sukeshsuresh189269 views
13: What do the following statements do? von sukeshsuresh189
13: What do the following statements do?13: What do the following statements do?
13: What do the following statements do?
sukeshsuresh189286 views
8: Which statement below could be used to randomly select a state from an arr... von sukeshsuresh189
8: Which statement below could be used to randomly select a state from an arr...8: Which statement below could be used to randomly select a state from an arr...
8: Which statement below could be used to randomly select a state from an arr...
sukeshsuresh189482 views
11: Which is a correct way to invoke the static method sqrt of the Math class? von sukeshsuresh189
11: Which is a correct way to invoke the static method sqrt of the Math class?11: Which is a correct way to invoke the static method sqrt of the Math class?
11: Which is a correct way to invoke the static method sqrt of the Math class?
sukeshsuresh189596 views
202: When the user clicks a JCheckBox, a(n) occurs. von sukeshsuresh189
202: When the user clicks a JCheckBox, a(n) occurs.202: When the user clicks a JCheckBox, a(n) occurs.
202: When the user clicks a JCheckBox, a(n) occurs.
sukeshsuresh189493 views
4: Which of the following is a Scanner method? von sukeshsuresh189
4: Which of the following is a Scanner method?4: Which of the following is a Scanner method?
4: Which of the following is a Scanner method?
sukeshsuresh189386 views
23: Which layout manager is the default for JPanel? von sukeshsuresh189
23: Which layout manager is the default for JPanel?23: Which layout manager is the default for JPanel?
23: Which layout manager is the default for JPanel?
sukeshsuresh189289 views

Más de alsofshionchennai

Q12) Consider a consumer who can purchase different combinations o.pdf von
Q12) Consider a consumer who can purchase different combinations o.pdfQ12) Consider a consumer who can purchase different combinations o.pdf
Q12) Consider a consumer who can purchase different combinations o.pdfalsofshionchennai
7 views1 Folie
provide answers to all subquestions please Consider an open econo.pdf von
provide answers to all subquestions please  Consider an open econo.pdfprovide answers to all subquestions please  Consider an open econo.pdf
provide answers to all subquestions please Consider an open econo.pdfalsofshionchennai
5 views1 Folie
Provide a value for the char-type variable x that satisfies the foll.pdf von
Provide a value for the char-type variable x that satisfies the foll.pdfProvide a value for the char-type variable x that satisfies the foll.pdf
Provide a value for the char-type variable x that satisfies the foll.pdfalsofshionchennai
2 views1 Folie
provide sequence diagrams to this and give brief rundown to the diag.pdf von
provide sequence diagrams to this and give brief rundown to the diag.pdfprovide sequence diagrams to this and give brief rundown to the diag.pdf
provide sequence diagrams to this and give brief rundown to the diag.pdfalsofshionchennai
2 views1 Folie
Provide a prediction interval for an additional observation of blade.pdf von
Provide a prediction interval for an additional observation of blade.pdfProvide a prediction interval for an additional observation of blade.pdf
Provide a prediction interval for an additional observation of blade.pdfalsofshionchennai
2 views1 Folie
Propst-Steele Production Corporations accounting records provide th.pdf von
Propst-Steele Production Corporations accounting records provide th.pdfPropst-Steele Production Corporations accounting records provide th.pdf
Propst-Steele Production Corporations accounting records provide th.pdfalsofshionchennai
2 views1 Folie

Más de alsofshionchennai(20)

Q12) Consider a consumer who can purchase different combinations o.pdf von alsofshionchennai
Q12) Consider a consumer who can purchase different combinations o.pdfQ12) Consider a consumer who can purchase different combinations o.pdf
Q12) Consider a consumer who can purchase different combinations o.pdf
provide answers to all subquestions please Consider an open econo.pdf von alsofshionchennai
provide answers to all subquestions please  Consider an open econo.pdfprovide answers to all subquestions please  Consider an open econo.pdf
provide answers to all subquestions please Consider an open econo.pdf
Provide a value for the char-type variable x that satisfies the foll.pdf von alsofshionchennai
Provide a value for the char-type variable x that satisfies the foll.pdfProvide a value for the char-type variable x that satisfies the foll.pdf
Provide a value for the char-type variable x that satisfies the foll.pdf
provide sequence diagrams to this and give brief rundown to the diag.pdf von alsofshionchennai
provide sequence diagrams to this and give brief rundown to the diag.pdfprovide sequence diagrams to this and give brief rundown to the diag.pdf
provide sequence diagrams to this and give brief rundown to the diag.pdf
Provide a prediction interval for an additional observation of blade.pdf von alsofshionchennai
Provide a prediction interval for an additional observation of blade.pdfProvide a prediction interval for an additional observation of blade.pdf
Provide a prediction interval for an additional observation of blade.pdf
Propst-Steele Production Corporations accounting records provide th.pdf von alsofshionchennai
Propst-Steele Production Corporations accounting records provide th.pdfPropst-Steele Production Corporations accounting records provide th.pdf
Propst-Steele Production Corporations accounting records provide th.pdf
proporcione las respuestas para estas dos preguntas a continuaci�n.pdf von alsofshionchennai
proporcione las respuestas para estas dos preguntas a continuaci�n.pdfproporcione las respuestas para estas dos preguntas a continuaci�n.pdf
proporcione las respuestas para estas dos preguntas a continuaci�n.pdf
provide a brief description paragraph on the fungi, then the taxon.pdf von alsofshionchennai
provide a brief description paragraph on the fungi, then the taxon.pdfprovide a brief description paragraph on the fungi, then the taxon.pdf
provide a brief description paragraph on the fungi, then the taxon.pdf
Proporcione un ejemplo de c�mo las pr�cticas deficientes de gobierno.pdf von alsofshionchennai
Proporcione un ejemplo de c�mo las pr�cticas deficientes de gobierno.pdfProporcione un ejemplo de c�mo las pr�cticas deficientes de gobierno.pdf
Proporcione un ejemplo de c�mo las pr�cticas deficientes de gobierno.pdf
Proporcione un ejemplo para una distribuci�n de probabilidad discr.pdf von alsofshionchennai
Proporcione un ejemplo para una distribuci�n de probabilidad discr.pdfProporcione un ejemplo para una distribuci�n de probabilidad discr.pdf
Proporcione un ejemplo para una distribuci�n de probabilidad discr.pdf
Project Group IMC Advertising Campaign Analysis and ExtensionBa.pdf von alsofshionchennai
Project Group IMC Advertising Campaign Analysis and ExtensionBa.pdfProject Group IMC Advertising Campaign Analysis and ExtensionBa.pdf
Project Group IMC Advertising Campaign Analysis and ExtensionBa.pdf
Project ScheduleUse Goods Company Inc. HRM Standardization Project.pdf von alsofshionchennai
Project ScheduleUse Goods Company Inc. HRM Standardization Project.pdfProject ScheduleUse Goods Company Inc. HRM Standardization Project.pdf
Project ScheduleUse Goods Company Inc. HRM Standardization Project.pdf
PROGISTIX-SOLUTIONS INC LA RED DE PIEZAS CR�TICAS Gary Parkinson, a.pdf von alsofshionchennai
PROGISTIX-SOLUTIONS INC LA RED DE PIEZAS CR�TICAS Gary Parkinson, a.pdfPROGISTIX-SOLUTIONS INC LA RED DE PIEZAS CR�TICAS Gary Parkinson, a.pdf
PROGISTIX-SOLUTIONS INC LA RED DE PIEZAS CR�TICAS Gary Parkinson, a.pdf
profit and lost prediction for 3months question complete predicto.pdf von alsofshionchennai
profit and lost prediction for 3months question complete predicto.pdfprofit and lost prediction for 3months question complete predicto.pdf
profit and lost prediction for 3months question complete predicto.pdf
Produce an ERD that portrays the relationships listed below. Provide.pdf von alsofshionchennai
Produce an ERD that portrays the relationships listed below. Provide.pdfProduce an ERD that portrays the relationships listed below. Provide.pdf
Produce an ERD that portrays the relationships listed below. Provide.pdf
Problema 7-09 (Algor�tmico) Hawkins Manufacturing Company produce .pdf von alsofshionchennai
Problema 7-09 (Algor�tmico) Hawkins Manufacturing Company produce .pdfProblema 7-09 (Algor�tmico) Hawkins Manufacturing Company produce .pdf
Problema 7-09 (Algor�tmico) Hawkins Manufacturing Company produce .pdf
Programa de reanimaci�n neonatal Su equipo est� reanimando a un re.pdf von alsofshionchennai
Programa de reanimaci�n neonatal Su equipo est� reanimando a un re.pdfPrograma de reanimaci�n neonatal Su equipo est� reanimando a un re.pdf
Programa de reanimaci�n neonatal Su equipo est� reanimando a un re.pdf
Project Beta is a 4-year project which requires an initial outlay of.pdf von alsofshionchennai
Project Beta is a 4-year project which requires an initial outlay of.pdfProject Beta is a 4-year project which requires an initial outlay of.pdf
Project Beta is a 4-year project which requires an initial outlay of.pdf
Program 2 in JAVA please!-Show the ListStackADTT interface-Cre.pdf von alsofshionchennai
Program 2 in JAVA please!-Show the ListStackADTT interface-Cre.pdfProgram 2 in JAVA please!-Show the ListStackADTT interface-Cre.pdf
Program 2 in JAVA please!-Show the ListStackADTT interface-Cre.pdf

Último

Peripheral artery diseases by Dr. Garvit.pptx von
Peripheral artery diseases by Dr. Garvit.pptxPeripheral artery diseases by Dr. Garvit.pptx
Peripheral artery diseases by Dr. Garvit.pptxgarvitnanecha
124 views48 Folien
Volf work.pdf von
Volf work.pdfVolf work.pdf
Volf work.pdfMariaKenney3
90 views43 Folien
MercerJesse3.0.pdf von
MercerJesse3.0.pdfMercerJesse3.0.pdf
MercerJesse3.0.pdfjessemercerail
163 views6 Folien
11.21.23 Economic Precarity and Global Economic Forces.pptx von
11.21.23 Economic Precarity and Global Economic Forces.pptx11.21.23 Economic Precarity and Global Economic Forces.pptx
11.21.23 Economic Precarity and Global Economic Forces.pptxmary850239
52 views9 Folien
Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf von
 Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf
Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdfTechSoup
62 views28 Folien
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE... von
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...Nguyen Thanh Tu Collection
100 views91 Folien

Último(20)

Peripheral artery diseases by Dr. Garvit.pptx von garvitnanecha
Peripheral artery diseases by Dr. Garvit.pptxPeripheral artery diseases by Dr. Garvit.pptx
Peripheral artery diseases by Dr. Garvit.pptx
garvitnanecha124 views
11.21.23 Economic Precarity and Global Economic Forces.pptx von mary850239
11.21.23 Economic Precarity and Global Economic Forces.pptx11.21.23 Economic Precarity and Global Economic Forces.pptx
11.21.23 Economic Precarity and Global Economic Forces.pptx
mary85023952 views
Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf von TechSoup
 Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf
Ask The Expert! Nonprofit Website Tools, Tips, and Technology.pdf
TechSoup 62 views
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE... von Nguyen Thanh Tu Collection
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (FRIE...
Pharmaceutical Analysis PPT (BP 102T) von yakshpharmacy009
Pharmaceutical Analysis PPT (BP 102T) Pharmaceutical Analysis PPT (BP 102T)
Pharmaceutical Analysis PPT (BP 102T)
yakshpharmacy009116 views
Interaction of microorganisms with vascular plants.pptx von MicrobiologyMicro
Interaction of microorganisms with vascular plants.pptxInteraction of microorganisms with vascular plants.pptx
Interaction of microorganisms with vascular plants.pptx
JRN 362 - Lecture Twenty-Two von Rich Hanley
JRN 362 - Lecture Twenty-TwoJRN 362 - Lecture Twenty-Two
JRN 362 - Lecture Twenty-Two
Rich Hanley39 views
12.5.23 Poverty and Precarity.pptx von mary850239
12.5.23 Poverty and Precarity.pptx12.5.23 Poverty and Precarity.pptx
12.5.23 Poverty and Precarity.pptx
mary850239514 views
Presentation_NC_Future now 2006.pdf von Lora
Presentation_NC_Future now 2006.pdfPresentation_NC_Future now 2006.pdf
Presentation_NC_Future now 2006.pdf
Lora 37 views
JQUERY.pdf von ArthyR3
JQUERY.pdfJQUERY.pdf
JQUERY.pdf
ArthyR3107 views
Career Building in AI - Technologies, Trends and Opportunities von WebStackAcademy
Career Building in AI - Technologies, Trends and OpportunitiesCareer Building in AI - Technologies, Trends and Opportunities
Career Building in AI - Technologies, Trends and Opportunities
WebStackAcademy47 views
INT-244 Topic 6b Confucianism von S Meyer
INT-244 Topic 6b ConfucianismINT-244 Topic 6b Confucianism
INT-244 Topic 6b Confucianism
S Meyer49 views
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption... von BC Chew
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
Artificial Intelligence and The Sustainable Development Goals (SDGs) Adoption...
BC Chew38 views

Programming 1 IA 01. Create a Java class called GameCharacterthat .pdf

  • 1. Programming 1 IA 01. Create a Java class called GameCharacterthat hasthe following attrbutes: The class should have the following methods: getName(): This method should return the name of the character. setName(String name): This method should set the name of the character. getHitPoints(): This method should return the current hit points of the character, setHitPoints(int hitPoints): This method should set the hit points of the character getDamagePoints: This method should return the damage points of the character. setDamagePoints (int damagePoints): This method should set the damage points of the character. attack(GameCharacter character): This method should subtract the character's damage points from the target character's hit points. Create a Player class that extends the Game Character class and has the following attributes: level (an integer) experiencePoints (an integer) The class should have the following methods: Create an Enemy class that extends the Came Character lass and has the following attributes: The class should have the following methods; from the enemy's hit points and print a message indicating how much damage was dealt. In the Main class, create a Player object and an Enemy object, set their attributes, and have them attack each other until one of them has no more hit points. Print a message indicating which character won the fight. Q2. Using Python, create an abstract class called BankAccountwith the following attributes and Create two classes called CheckingAccount and SavingsAccountthat inherit from BankAccount. The CheckingAccount class should have a method called withdraw that allows the account holder to Withdraw money, but charges a transaction fee of GHS 0.50 per withdrawal. The SavingsAccount class should have a method called withdraw that allows the account holder to withdraw money, but
  • 2. only if there is sufficient balance in the account. Q3. Create a PHP class called "StudentRegistration" with the following properties: The class should have the following methods: Create a new instance of the "StudentRegistration" class and set its properties to some values Then, use the "setStudentName()", "setRegistrationDate()", "getStudentName()" "getRegistrationDate()", and "daysSinceRegistration()" methods to perform some operations and print out the results.