C++ Programming. Create a "Stool' class. Fields: height (h, cm), product quality (low, medium, high). Specify two virtual methods: The "Wood amount" method determines the amount of wood that goes into the stool: 4 • h + 12 if the product quality is low, 5 • h + 14 if the quality is average or high. "Price" method is equal to d • 2 for low quality, d • 3 for medium quality, d • 4 for high quality, where d is the amount of wood required for the object. Also write an "Information" method that prints information about the object: Height, Material Quality, Wood Quantity, and Price. Also create an inheritance class "Chair". Additional area: back height (h2, cm). In the reloaded "Amount of Wood" method, the amount of wood is calculated using the formula d + 2 • h2 + 5.
C++
Create a "Stool' class. Fields: height (h, cm), product quality (low, medium, high). Specify two virtual methods: The "Wood amount" method determines the amount of wood that goes into the stool: 4 • h + 12 if the product quality is low, 5 • h + 14 if the quality is average or high. "Price" method is equal to d • 2 for low quality, d • 3 for medium quality, d • 4 for high quality, where d is the amount of wood required for the object. Also write an "Information" method that prints information about the object: Height, Material Quality, Wood Quantity, and Price. Also create an inheritance class "Chair". Additional area: back height (h2, cm). In the reloaded "Amount of Wood" method, the amount of wood is calculated using the formula d + 2 • h2 + 5.

Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 3 images









