Answer:
milk_produced = float(input("Enter the total amount of milk produced in the morning: "))
liter_cost = float(input("Enter the cost of producing one liter of milk: "))
carton_profit = float(input("Enter the profit on each carton of milk: "))
carton_needed = round(milk_produced / 3.78)
cost = milk_produced * liter_cost
profit = carton_profit * carton_needed
print("The number of milk cartons needed to hold milk is " + str(carton_needed))
print("The cost of producing milk is " + str(cost))
print("The profit for producing milk is " + str(profit))
Explanation:
*The code is in Python.
Ask the user to enter milk_produced, liter_cost and carton_profit
Calculate the number of milk cartons needed, divide the milk_produced by the capacity (3.78) of a cartoon and round the result
Calculate the cost, multiply the milk_produced by liter_cost
Calculate the profit, multiply the carton_profit by carton_needed
Print the results
Answer:
Encapsulation:-It is the binding of the data and functions so that they works as one unit.
Inheritance:-When one class acquires the property of another class it is called inheritance.
Polymorphism :-It generally means more than one form
Explanation:
Encapsulation:- class is an example of encapsulation it can hold different data types and functions in a single container called class.
class Name{
public:
string first_name;
string last_name;
void Display()
{
cout<<first_name<<" "<<last_name<<endl;
}
};
Inheritance:-The property of a class acquiring the properties of another class is called inheritance.
Now we will inherit the above defined class.
class person: public Name
{
public:
char gender;
int age;
void Display()
{
cout<<first_name<<" "<<last_name<<gender<<age<<endl;
}
};
int main()
{
Name n;
person p;
n.Display();
p.Display();
}
Polymorphism- There are two types of polymorphism:-
1.Run time polymorphism=The values are decided at run time.
2.Compile time polymorphism=The values are decided at compile time.
Example:-In the above example we have function Display() in both the classes.This is an example of compile-time polymorphism. We are deciding at the time of compilation which display to use.
Answer:
flat screw driver
because if the screw is negative then you will need a flat screw driver
I think it the answer would be B but I'm not sure
Yes, because it keeps all your data organized and allows you to see the trend and growth of your data by automatically creating different types of charts and graphs to help you visualize your data.
Hope that helps!