Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CS 2010 Lab 4 Carols Carpets Name: ______________________ 10 Points (Due Thursday, 2/19) Purpose: This assignment encourages students to practice the 4-step program design cycle.

CS 2010 Lab 4 Carols Carpets Name: ______________________ 10 Points (Due Thursday, 2/19) Purpose: This assignment encourages students to practice the 4-step program design cycle. Problem: Carols Carpets Company builds custom-sized area rugs. With materials and labor, it costs Carols $4.50 per square foot to cut and finish a rug. In turn, they charge customers $7.95 per square foot for the finished product. Design & Implement a program that accepts the carpet dimensions (length and width), calculates the area of the carpet in square feet, the customer price, and the profit for a custom carpet from Carols Carpets. Example Output Step 1 Analyze: Read the problem description. Ensure that you understand the requirements. Ask question if you require clarification. List and describe any constants and/or variables needed. Constant/Variable Name Description __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ __________________________________________________________________________________ TIP: See Section 3.11 Focus on Problem Solving: A Case Study on pages 134-137 in your textbook for a similar example. Step 2 Design: Complete the hierarchy chart for the program. Write the program steps in pseudocode. (NOT C++ Code) _____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ____________________________________________________________________________________________________________________ ___________________________________________________________________________________________________________________ Step 3 Implement: 1. Create a Visual Studio Project/Solution named LastnameLab4 2. Expand the pseudocode into program code. TIP: Use incremental testing. (Code a little test. Code a little test.) Step 4 Test: Test your code with the given data as well as other possible user inputs. Use a calculator to check your results. Note: See the tip regarding incremental testing in Step 3 What to Submit? 1. Write your name on the lab sheet and turn in the hard copy including your list of constants & variables, hierarchy chart and pseudocode/ 2. Zip your top-level LastnameLab4 solution folder. Upload LastnameLab4.zip via the Lab 4 link in the Week 4 Module on Canvas.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions