Menu

[Solved]Introduction Work Company Manufactures Ornamental Geometric Shapes Factory Region Speciali Q37155908

Introduction You work for a company that manufactures ornamental geometric shapes. The factory in your region specializes in2 Figure 3: Tetrahedron in scanner coordinate system In normal operation, the coordinates of the vertices are automatically sPrimary Program Requirements Until the damaged controller is replaced, you need a way to perform the tedious calculations morMonetary Tables The prices in U.S. Dollars (USD or $) of the base materials are: Size Small Medium Large Price in USD 75 125Additional Requirements ° Define important constant values as macros or const variables * For grading consistency, use type dSample Run Currency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. DollCurrency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. Dollar 3 Japane

Introduction You work for a company that manufactures ornamental geometric shapes. The factory in your region specializes in making hollow tetrahedrons that are coated with a variety of precious metal paints in a proprietary process. Part of the object’s cost depends on the amount of paint used, which is determined by the surface area of the object. A tetrahedron1 is composed of four triangular faces, three of which meet at each vertex. It has six edges and four vertices. Figure 1: Tetrahedron (Wikimedia Commons – https://commons.wikimedia.org/wiki/File:Euclid_Tetrahedron_4.svg) Unit A Production Machine Unit B 3-D Scanner Unit C Painting Machine Figure 2: Machine for making painted tetrahedron:s The factory has a machine that produces tetrahedrons of random sizes on a continuous basis (Unit A in Figure 2) . Each tetrahedron falls down a tube to a catching mechanism beneath the tube. Within the tube is a 3-dimensional scanner (Unit B) that instantly scans and records the Cartesian x, y, and z coordinates (in centimeters) of each vertex 2 Figure 3: Tetrahedron in scanner coordinate system In normal operation, the coordinates of the vertices are automatically sent to a custom-built computer controller that calculates the surface area of the tetrahedron. The controller then tells the painting machine (Unit C) to use exactly the right amount of paint to cover all four faces of the object. The controller also selects the type of paint (silver, gold, or platinum), which is based on the overall size of the tetrahedron (the smaller the object, the more expensive the paint). Finally, the controller determines the price to charge for the completed piece of “art” and generates a price label. Collectors from all over the world covet these expensive trinkets, and the company makes a very sizeable profit from each sale. Or so it did until a week ago when a disgruntled employee started ranting about the insanity of selling useless, bourgeois junk and decided to destroy the custom controller with a sledgehammer. The painting machine needs to know exactly how much paint to use for each tetrahedron, since the company cannot afford to waste a single precious drop. (It incorporates Magic Dust, or maybe radium, to give it that iridescent glow.) Fortunately, the scanner has a display panel that shows the set of four vertex coordinates for each tetrahedron it scans. The painting machine has a backup keyboard for entering a surface area value and the type of paint to use. Plus, you have access to a mechanical label making machine for producing price tags Your boss has given you the task of finding a way to restart the production line or else Primary Program Requirements Until the damaged controller is replaced, you need a way to perform the tedious calculations more efficiently and quickly than using a calculator. Hence, your job is to write a C program that performs the following tasks: Use a while loop to keep repeating these steps until the user decides to quit: 1. Prompts for the desired currency unit. (See the Monetary Tables section below for the currency types that must be supported.) ° If the user enters a ‘q’ or ‘Q’ character, then the program should quit Prompts for the (x, y, z) coordinates (in centimeter units) of each of the tetrahedron’s four vertices. Assume you are manually typing in the coordinates that the 3-D scanner displays. Calculates and displays (to 3 decimal places) the total exterior surface area of the tetrahedron. Determines and displays the type of paint to use, based on these criteria: 2. 3. 4. area < 25 cm2 25 cm2 100 cm2-area 〈 400 cm2 400 cm2くarea 〈 1000 cm2 area 2 1000 cm Discard tetrahedron (too small) (“SMALL” size) → Select platinum paint (“MEDIUM” size) → Select gold paint (“LARGE” size) → Select silver paint Discard tetrahedron (too big) area 〈 100 cm2 · 5. Displays the final price in the selected currency unit. The price is calculated from the following factors: Base materials: cost of the tetrahedron’s structural elements (which depends on the amount of surface area) Paint: total exterior surface area multiplied by the paint cost (type of paint depends on the amount of surface area) Markup: (Base + Paint) is multiplied by a markup factor to account for other costs and to achieve an outrageous profit margin. The markup factor is 2.75. The exchange rate for the selected currency unit. * ° * Monetary Tables The prices in U.S. Dollars (USD or $) of the base materials are: Size Small Medium Large Price in USD 75 125 250 The prices in U.S. Dollars (USD or $) of the special paint are: Price in USD per square foot USD / ft2 525 390 42 Paint Type Platinum Gold Silver The currency exchange rates for the day are: Currency Exchange Rate Country Canada China Europe Great Britain0.76683 British Pound Mexico Russia United States1 USD Japan 1 USD 1.33782 Canadian Dollar 6.70878 Yuan 0.89118 Euro 19.0601 Peso 65.2766 Ruble 111.68 Yen Additional Requirements ° Define important constant values as macros or const variables * For grading consistency, use type double for numeric variables and calculations. * The source code should use at least one if-style (or if-else or if-else if) statement and at least one switch statement. * Write all your code in the main function. Do not write your own extra functions yet. * Do not use global variables, arrays, or string variables for this assignment For the Program Design Report, briefly document your approach to the area calculations. Showing your equations with a labeled diagram is a good thing . Good programming style is important. Comment your program properly. . Your program must conform to either the ISO C99 or ISO C90 standard. . Save your program using this filename: hw3.c Notes & Hints Geometric Considerations The scanner coordinate system has these properties: o x, y, and z are floating point values. o x and y may be positive or negative in value. o z is either zero or a positive value. Do not assume the faces of the tetrahedron are equilateral triangles; they most likely are not . Assume that one vertex of the tetrahedron will always be pointing straight up when it passes hrough the scanner. It is also the first vertex to be recorded and displayed by the scanner HINT: You can find the area of an arbitrary triangle by applying Heron’s formula*. All you need to know are the lengths of the sides of the triangle. Since you have the 3-D coordinates of each vertex of the tetrahedron, so you can compute the side lengths for each triangular face. Sample Run Currency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. Dollar Japanese Yen Enter desired currency (or Q to quit): u Please enter tetrahedron vertex coordinates in this format: x y z Vertex A: 0 0 10 Vertex B: 0 0 0 Vertex C: 10 0 0 Vertex D: 0 10 0 Total Surface area236.603cm 2 Paint: Gold Total Cost-616.89 USD Currency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. Dollar Japanese Yen Enter desired currency (or Q to quit): b Please enter tetrahedron vertex coordinates in this format x yz Vertex A: 0 10 Vertex B: e Vertex C: 10 e 0 Vertex D: 0 10 Total Surface area 236.603cm 2 Paint: Gold Total Cost473.05 Pound Currency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. Dollar Japanese Yen Enter desired currency (orQ to quit): u Please enter tetrahedron vertex coordinates in this format: x y z Vertex A: 0 0 5 Vertex B:1 -1 Vertex C: 1 e 0 Vertex D: 0 2 0 Total Surface area21.760 cmA2 Rejected: Too small Currency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. Dollar 3 Japanese Yen Enter desired currency (or Q to quit) e Please enter tetrahedron vertex coordinates in this format: x y z Vertex A: 1 1 15 Vertex B: -1 -1 3 Vertex C: 1 0 2 Vertex D: 0 5 0 Total Surface area95.488 cm2 Paint: Platinum Total Cost316.05 Euro Currency Types: C Canadian Dollar Y Chinese Yuan E Euro B British Pound M Mexican Peso R Russian Ruble U U.S. Dollar Japanese Yen Enter desired currency (or Q to quit): q You are free to make your program’s output look as fancy or as plain as you like (within reason) Show transcribed image text Introduction You work for a company that manufactures ornamental geometric shapes. The factory in your region specializes in making hollow tetrahedrons that are coated with a variety of precious metal paints in a proprietary process. Part of the object’s cost depends on the amount of paint used, which is determined by the surface area of the object. A tetrahedron1 is composed of four triangular faces, three of which meet at each vertex. It has six edges and four vertices. Figure 1: Tetrahedron (Wikimedia Commons – https://commons.wikimedia.org/wiki/File:Euclid_Tetrahedron_4.svg) Unit A Production Machine Unit B 3-D Scanner Unit C Painting Machine Figure 2: Machine for making painted tetrahedron:s The factory has a machine that produces tetrahedrons of random sizes on a continuous basis (Unit A in Figure 2) . Each tetrahedron falls down a tube to a catching mechanism beneath the tube. Within the tube is a 3-dimensional scanner (Unit B) that instantly scans and records the Cartesian x, y, and z coordinates (in centimeters) of each vertex
2 Figure 3: Tetrahedron in scanner coordinate system In normal operation, the coordinates of the vertices are automatically sent to a custom-built computer controller that calculates the surface area of the tetrahedron. The controller then tells the painting machine (Unit C) to use exactly the right amount of paint to cover all four faces of the object. The controller also selects the type of paint (silver, gold, or platinum), which is based on the overall size of the tetrahedron (the smaller the object, the more expensive the paint). Finally, the controller determines the price to charge for the completed piece of “art” and generates a price label. Collectors from all over the world covet these expensive trinkets, and the company makes a very sizeable profit from each sale. Or so it did until a week ago when a disgruntled employee started ranting about the insanity of selling useless, bourgeois junk and decided to destroy the custom controller with a sledgehammer. The painting machine needs to know exactly how much paint to use for each tetrahedron, since the company cannot afford to waste a single precious drop. (It incorporates Magic Dust, or maybe radium, to give it that iridescent glow.) Fortunately, the scanner has a display panel that shows the set of four vertex coordinates for each tetrahedron it scans. The painting machine has a backup keyboard for entering a surface area value and the type of paint to use. Plus, you have access to a mechanical label making machine for producing price tags Your boss has given you the task of finding a way to restart the production line or else
Primary Program Requirements Until the damaged controller is replaced, you need a way to perform the tedious calculations more efficiently and quickly than using a calculator. Hence, your job is to write a C program that performs the following tasks: Use a while loop to keep repeating these steps until the user decides to quit: 1. Prompts for the desired currency unit. (See the Monetary Tables section below for the currency types that must be supported.) ° If the user enters a ‘q’ or ‘Q’ character, then the program should quit Prompts for the (x, y, z) coordinates (in centimeter units) of each of the tetrahedron’s four vertices. Assume you are manually typing in the coordinates that the 3-D scanner displays. Calculates and displays (to 3 decimal places) the total exterior surface area of the tetrahedron. Determines and displays the type of paint to use, based on these criteria: 2. 3. 4. area

Expert Answer


Answer to Introduction You work for a company that manufactures ornamental geometric shapes. The factory in your region specialize… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *