Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

•Write an application for a furniture company; the program determines the price

ID: 3631737 • Letter: #

Question

•Write an application for a furniture company; the program determines the price of a table. Ask the user to choose 1 for pine, 2 for oak, or 3 for mahogany. The output is the name for the wood chosen as well as the price of the table. Pine tables cost $100, oak tables cost $225, and mahogany tables cost $310. If the user enters an invalid wood code, set the price to 0. Save your file as Furniture.cs.
•Add a prompt to the above application to ask the user to specify a (1) large or (2) small table. Add $35 to the price of any large table

Explanation / Answer

i have the code in java: i even have the files to directly run. let me know if you want them. i think you can convert this code into c by yourself. otherwise there are some java to c converters available free online.. you can use them. import java.util.*; public class Furniture { public static void main(String[] args) { int tree = 0; Scanner scan = new Scanner(System.in); System.out.println("Enter 1 for pine 2 for oak 3 for mahogany"); try { tree = scan.nextInt(); } catch(Exception e) { System.out.println("Invalid input. Only numbers are accepted"); } int cost = 0; if(tree == 1) cost = 100; else if(tree == 2) cost = 225; else if(tree == 3) cost = 310; else cost = 0; String tab = ""; if(tree == 1) tab = "Pine"; else if(tree == 2) tab = "Oak"; else if(tree == 3) tab = "Mahogany"; System.out.println("This " + tab + " table will cost you $" + cost); } } please dont forget to rate my answer :)