Answer:
The correct answer for the given question is "public"
Explanation:
The access modifier of constructor is public,private ,protected.
The access modifier of constructor should be public because to access the constructor outside the class .
Constructor can be called anywhere in program by using public access modifier .
The default access modifier in a class is public.
In the private access modifier constructor cannot be called anywhere in program.
We use public keyword to declared public constructor .
We use private keywors to declared private constructor.
Following are example to declared public and private constructor
class test
{
public test() // to declared public constructor
{
// statement
}
private test() // to declared private constructor
{
// statement
}
}
Answer:
#here is code in python.
# read the food bill
tot_bill=float(input("Please enter the food bill:"))
# tax on food
tax=0.06
#choice for tip by user
choice=int(input("enter your choice for tip:(1 for 15%, 2 for 18% and 3 for 20% :)"))
// calculate the total food bill
if choice==1:
tot_food_bill=tot_bill+tot_bill*tax+tot_bill*(.15)
elif choice==2:
tot_food_bill=tot_bill+tot_bill*tax+tot_bill*(.18)
elif choice==3:
tot_food_bill=tot_bill+tot_bill*tax+tot_bill*(.2)
else:
print("invalid choice:")
#print the total food bill
print("total food bill is ",tot_food_bill)
Explanation:
Read the food bill from user and assign it to variable "tot_bill".Initialize the tax=0.06 (i.e. 6%) on the bill.Then ask user to give his choice for tip. if the choice is 1 then tip will be 15%, if 2 then 18% and if choice is 3 Then tip will be 20% of the bill.Calculate the total food bill and assign it to variable "tot_food_bill".
Output:
Please enter the food bill:100
enter your choice for tip:(1 for 15%, 2 for 18% and 3 for 20% :)2
total food bill is 124.0
It was signed in 2009..!!
hope its right!
13? 13 is most minimum ages however, I don't understand this question all that well.