The answer is D.
Inheritance means that a child class (subclass) can inherit functionality from a parent class (superclass). For example, a class called Person could have 2 subclasses called Student and Teacher. While Student and Teacher have attributes and methods that differ, they also have some that overlap. By passing these overlapping functionalities down from the Person class, we are making the code more reusable. This eliminates the need to write duplicate code and makes the code more readable.
Answer:
<u>Algorithm()
</u>
1. p = Enter the price of item A.
2. c = Enter the number of A’s purchased.
3. Now the price per item with tax is:
t= p+(p*6/100)
4. The total cost of c items:
ct= t * c.
5. Print ct.
In this algorithm, we are taking the price per item and counting it’s cost including tax. Then we are multiplying the price per item with tax with the number of items we purchase, to find the overall cost with tax.
You may calculate the overall cost without tax as (p*c). Then you can find the overall cost with tax as ((p*c)+(p*c*6/100)), as in both way, we will get the same result.
Explanation:
1a. i know only 4 components of computer these are users, data,hardware & software
1b.users,the person who use the computer
data,it is the collection of raw facts and figures
hardware,is the physical part of the computer that can be seen and touch
software,is a set of program that instruct the computer to perform the certain action
2a,an internet is worldwide systen of interconnected computer network
2b.if some student want to now about something he can use internet and get the answer,to commenicate with others,and to learn online
public class 4by4Square
{
public static void main(){
System.out.println("xxxx \nx x\nx x\nxxxx");
}
}
<h2><u>~CaptnCoderYankee</u></h2>