Answer:
Hi DancingGrace! The issue with the code is that it is trying to extend multiple classes which is not a feature in Java programming.
Explanation:
The extends keyword allows a class to use the attributes and properties of the base class it is extending and add more features and properties into it's own class. This is useful in programming where different models share similar properties but are slightly different. An example would be designing a class for Car and Bike. Both have some similar properties like wheels, engine, etc, however they are different forms of transport. A useful implementation would be to define a class called Vehicle with similar attributes, and have the Car and Bike extend it.
It can help ensure that everything is correct. Having an extra set of eyes can never hurt :)
Answer:
Explanation:
data is a statement like
data 10,20, 30 , 40 , 50, 60 , 70, 80
\\the numbers represent ages.
For x := 1 to end of data do a[x]:=read(data)
\\ This is a comment. You could do this much easier if you just use three if statements rather than the if then else.
minor:=0;adult:=0;senior:=0;
while a[x] <> 0 do begin
age:= a[x]
if age < 19 then minor:=minor + 1;
If age > 18 then if age < 65 the adult:=adult + 1;
if age > 64 then senior := senior + 1;
end;
I have not declared the variables anywhere. That depends on what language you are using. The key step you want are the three if statements. How you find out what's in them is another matter.
Man i do not speak spanish L