Answer :

There was a four tier system. 
1) samurai: wielded enormous power
2)farmer/ peasant: produced all the food
3)artisan: produced necessary goods (clothes, ect.)
4( lowest class): merchants: traders, shopkeepers
shogun, buddist & shino priest were above all of the classes. 
The family name was important as the Tokugawa Clan ruled Japan for a while. The family rank was important. If you're born in a family of low rank, you can expect not being able to get a high rank position. 
Warriors/Courtiers (Highest class)
Peasantry
Artisans/Craftsmen
Merchants/Tradesmen
Townspeople
Outcasts and Ninjas (Lowest class)
(Funfact: Warriors didn't get much pay-some of the Artisans were richer than the Warriors, but the warriors had pride, so they did not show it.)

Other Questions