Answer:
Option a is the correct answer for the above question.
Explanation:
- The above question has the option in which two option holds a syntax which is used to declare a variable in PHP language. So the answer is on behalf of the PHP language.
- When a user wants to create an object of any class with the two-parameter in PHP language, then he can do it by the help of "class_name object_name= new class_name($argument1,$argument2)".
- The option 'a' follows the above syntax to create an object of Cart class. Hence it is a correct option while the other is not because:
- Option b states a syntax in which the new keyword is not defined which is used to create a new object.
- Option c states that option in which '$' is not defined to declare a variable.
- Option d states that option in which '$' is not defined to declare a variable.
The python program that creates a Bankaccount class for a Bank ATM that is made up of the customers and has a deposit and withdrawal function is given below:
<h3>Python Code</h3>
# Python program to create Bankaccount class
# with both a deposit() and a withdraw() function
class Bank_Account:
def __init__(self):
self.balance=0
print("Hello!!! Welcome to the Deposit & Withdrawal Machine")
def deposit(self):
amount=float(input("Enter amount to be Deposited: "))
self.balance += amount
print("\n Amount Deposited:",amount)
def withdraw(self):
amount = float(input("Enter amount to be Withdrawn: "))
if self.balance>=amount:
self.balance-=amount
print("\n You Withdrew:", amount)
else:
print("\n Insufficient balance ")
def display(self):
print("\n Net Available Balance=",self.balance)
# Driver code
# creating an object of class
s = Bank_Account()
# Calling functions with that class object
deposit()
s.withdraw()
s.display()
Read more about python programming here:
brainly.com/question/26497128
#SPJ1
MS Excel is a spreadsheet programme developed by Microsoft in 1985, with the sole purpose of helping businesses compile all their financial data, yearly credit, and yearly debit sheets. Fast forward to the future after 31 years, it is now the most commonly used program for creating graphs and pivot tables.
Answer:
huh .......................................
Explanation: