Law of definite composition: The elements which are present in the compound is combined in the same proportion by mass.
Law of multiple proportion: When two or more compounds are formed by the combination of two elements then the mass ratio of one element is combined with the fixed mass of the other element.
In case of methane, it consist of one carbon atoms and four hydrogen atoms implies that has definite composition. In terms of mass, in methane, carbon and hydrogen atoms are combined in a definite ratio i.e. 12 g C/ 4 g H. Thus, methane has definite composition.
Now, carbon and hydrogen combines to give a class i.e. hydrocarbon. In this case, for every constant mass of carbon the ratio of hydrogen will always reduce to 4/3 ratio for the formation of ethane (hydrocarbon). Thus, law of multiple proportion followed.
Similarly, in case of ethane, this compound also consist of exact atoms but in different ratios.
In case of ethane, it consist of two carbon atoms and six hydrogen atoms implies that has definite composition. In terms of mass, in ethane, carbon and hydrogen atoms are combined in a definite ratio i.e. 24 g C/ 6 g H. Thus, methane has definite composition.
Now, carbon and hydrogen combines to give a class i.e. hydrocarbon. In this case, for every constant mass of carbon the ratio of hydrogen will always reduce to a specific ratio for the formation of methane (hydrocarbon). Thus, law of multiple proportion followed.