Mix flavoring of your choice in a cup and set aside.
In a medium bowl, beat eggs with an electric mixer until frothy. In a large bowl, beat margarine or butter and sugar until light and frothy.
Add a little egg to margarine/sugar mixture and beat well. Add a little of the flour and baking powder mixture and beat. Repeat alternate additions of egg and flour, beating constantly until all is well blended.
Preheat the oven to 375°F. Meanwhile, add flavoring to batter and beat well. Grease and lightly flour the sides and bottom of two 7-inch cake pans about 1½ inches deep.
Spoon equal amounts of cake mixture into each pan and spread evenly with a spatula. Make the center a little lower than the sides because the center always rises more.
Bake cakes in the middle to upper part of the oven for 20 minutes, or until their edges come away from the pans. Remove from the oven and allow to cool for 10 minutes in the pans. Then tip cakes onto wire racks to cool completely.
Beat sugar and margarine together with an electric mixer until completely smooth.
Mix flavoring of your choice and add sugar/margerine mixture. (For chocolate frosting, you will already have mixed the sugar into the flavoring. Now beat flavoring and margarine together.)
To assemble cake, place one cake bottom-side-up on a serving plate and spread the top with half the frosting.
Place other cake right-side-up on top and press gently. Then spread the top with remaining frosting.