claude's custom counters, inc. *** note: due dates may be...

9
Project #1 Page 1 of 9 Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE DIFFERENT FOR DIFFERENT SECTIONS *** Background Claude has built a booming business designing high-end custom counters for discerning customers. Claude's motto, right angles are just wrong, guides his every design. While most vendors deliver boring rectangular designs, Claude will only produce parallelogram counters having interior angels that are not 90˚. As a boutique designer for eccentric customers Claude was previously able to make all calculations in his head. However, demand for his custom designs recently went mainstream and he is now in serious need of automation. You must develop a computer program to determine how much one of Claude's custom countertops will cost. Each countertop piece is cut from stone blocks. Materials currently offered are: Marble, at $92.99/sq ft installed Granite, at $78.99/sq ft installed Quartz, at $56.99/sq ft installed The initial cost of a counter is based upon the area of material required for fabrication. Because of wastage when pieces are cut, we must add 26% to the area of the finished piece and then round that up to the nearest whole number. Exposed edges can be finished by smoothing and polishing for $4.99 a linear foot. Program Input The type of stone (first letter of the stone name) The length of the countertop The depth of the countertop The height of the countertop How many length edges and depth edges are to be finished = ℎ × ℎℎ

Upload: others

Post on 20-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 1 of 9

Claude's Custom Counters, Inc.

*** NOTE: DUE DATES MAY BE DIFFERENT FOR DIFFERENT SECTIONS ***

Background

Claude has built a booming business designing high-end custom counters for discerning customers. Claude's

motto, right angles are just wrong, guides his every design. While most vendors deliver boring rectangular

designs, Claude will only produce parallelogram counters having interior angels that are not 90˚. As a boutique

designer for eccentric customers Claude was previously able to make all calculations in his head. However,

demand for his custom designs recently went mainstream and he is now in serious need of automation. You must

develop a computer program to determine how much one of Claude's custom countertops will cost.

Each countertop piece is cut from stone blocks. Materials currently offered are:

Marble, at $92.99/sq ft installed

Granite, at $78.99/sq ft installed

Quartz, at $56.99/sq ft installed

The initial cost of a counter is based upon the area of material required for fabrication. Because of wastage when

pieces are cut, we must add 26% to the area of the finished piece and then round that up to the nearest whole

number.

Exposed edges can be finished by smoothing and polishing for $4.99 a linear foot.

Program Input

The type of stone (first letter of the stone name)

The length of the countertop

The depth of the countertop

The height of the countertop

How many length edges and depth edges are to be finished

𝐴𝑟𝑒𝑎 = 𝑙𝑒𝑛𝑔𝑡ℎ × ℎ𝑒𝑖𝑔ℎ𝑡

Page 2: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 2 of 9

Each item of input requires validation. The minimum value for both length and depth is 5 feet. The maximum

value for both length and depth is 25 feet. The length must be greater than or equal to the depth (if the length

and depth are equal, the counter is a rhombus). The height must be between 58% and 80% of the shortest side:

5.0 ≤ 𝑙𝑒𝑛𝑔𝑡ℎ ≤ 25.0

5.0 ≤ 𝑑𝑒𝑝𝑡ℎ ≤ 25.0

𝑑𝑒𝑝𝑡ℎ ≤ 𝑙𝑒𝑛𝑔𝑡ℎ

0.58 (𝑑𝑒𝑝𝑡ℎ) ≤ ℎ𝑒𝑖𝑔ℎ𝑡 ≤ 0.80 (depth)

The type of stone must be one of the three options specified above. The number of finished length edges must be

an integer between 0 and 2. The number of finished depth edges must be an integer between 0 and 2. After each

value is entered, the value shall be tested to ensure that it is valid and/or within the appropriate numeric range. If

any entry is invalid an error message shall be displayed and the program will end. You are not required to test for

data type errors. This means that if a character value is expected you may assume that the user entered a

character, if a number is expected, you may assume that the user entered a number. For character values (such as

the first letter of stone names) your software shall accept both upper case and lower case letters as valid. Your

software shall also disregard any extraneous information typed after a valid entry. For example the lower case

letter g would be valid for granite, the upper case letter G would be valid for granite, as would the entire name

Granite (all characters after the G are ignored). If all values entered are valid, then your software shall make the

required calculations and output the results specified below.

Program Output

The length, depth, and height of the countertop

The number of square feet of material needed to begin fabrication

The cost of the stone

The cost of the edge finishing

The total cost of the above

Screen Captures

Page 3: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 3 of 9

Your software shall have "smart quotes" that inform the user of acceptable entries:

Your software shall accept upper case and lower case for character data entry. It shall also ignore any extraneous

characters entered after a valid value is entered. Note in the screen capture below, the entry Granite is accepted.

The upper case character G is stored as the user's entry. The remaining characters are ignored.

Page 4: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 4 of 9

Your software shall display clear error messages for any invalid entries. If an invalid value is entered, the program

should exit after displaying the error message.

Your software shall display neatly formatted, accurately calculated output.

Academic Integrity

This is an individual project and all work must be your own. Refer to the guidelines specified in the

Academic Honesty section of this course syllabus or contact me if you have any questions.

Page 5: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 5 of 9

Part A - Design Document (Submit by deadline as per professor instructions)

Create a flow diagram which illustrates the flow of execution for your proposed algorithmic solution. (As discussed in class), Use standard flow diagram format: boxes, diamonds and arrows. You may use a digital tool ( e.g. draw.io or Google Drawings) or you may draw the diagram by hand and digitize. Please include enough detail so that the implementation should follow from the direct translation of the diagram. Specifically, each box (task) should be performable using 1 – 3 lines of C++ code. When in doubt, add more detail. (Please also include constant and variable declarations / definitions needed. You may group many of these into one box.)

Simple Example:

Part A - Submission Details

Upload (as instructed by your professor) a .pdf file containing your design using the language described above. Use the following file name for your file: <netID>P1.pdf (replace <netID> with your netID and remove the

angle brackets). Late submissions will be penalized heavily – see rubric for details. If you are late you may turn in the project to receive feedback but the grade may be zero. In general requests for extensions will not be considered.

Include the following Ethics Statement in the submission comments within Canvas, when submitting the Design: COSC 051 <term-year> Project #1 Author: <your name> In accordance with the class policies and Georgetown's Honor Code, I certify that, with the exception of the class resources and those items noted below, I have neither given nor received any assistance on this project. References not otherwise commented within the program source code. Note that you should not mention any help from the TAs, the professor, or info taken from the class textbooks.

Page 6: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 6 of 9

Part B - Program Source Code (Submit by deadline as per professor instructions)

Important: Your output and input should be very similar to that shown in the sample output. Please ask for the

input in exactly the same order shown and only request the same items shown - do not ask for any other input.

This will assist in grading your program. Some content must also be included in your program exactly as specified.

Include the following comments at the start of your source code file: /*

* <FileName>.<file extension>

*

* COSC 051 <put year and term here>

* Project #1

*

* Due on: <put due date here>

* Author: <your name>

*

*

*

* In accordance with the class policies and Georgetown's

* Honor Code, I certify that, with the exception of the

* class resources and those items noted below, I have neither

* given nor received any assistance on this project.

*

* References not otherwise commented within the program source code.

* Note that you should not mention any help from the TAs, the professor,

* or any code taken from the class textbooks.

*/

These comments must appear exactly as shown above. The only difference will be values that you replace where there are "place holders" within angle brackets such as <netID> which should be replaced by your own netID.

For example, I would replace <netID>P1.cpp with waw23P1.cpp.

Part B - Submission Details

Upload (as instructed by your professor) a .cpp file containing your source code. Do NOT post your executable

file. You should ensure that your source file compiles on the server and that the executable file runs and

produces the correct output. Use the following file name for your file: <netID>P1.cpp. Late submissions will

be penalized heavily – see rubric for details. If you are late you may turn in the project to receive feedback but the

grade may be zero. In general, requests for extensions will not be considered.

Page 7: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 7 of 9

Part A – Grading Rubric

Page 8: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 8 of 9

Part B – Grading Rubric

Page 9: Claude's Custom Counters, Inc. *** NOTE: DUE DATES MAY BE …jeremybolton.georgetown.domains/courses/051/projects/... · 2018-09-17 · the first letter of stone names) your software

Project #1

Page 9 of 9