2023 Homework 2 Instructions Selection statements In this homework you will design a program to | Assignment Collections

Computer Science 2023 Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available

2023 Homework 2 Instructions Selection statements In this homework you will design a program to | Assignment Collections

Homework 2

Instructions

 

Selection statements

In this homework, you will design a program to perform the following task:

Calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from components available on the internet.

Before attempting this exercise, be sure you have completed all of chapter 3 and course module readings, participated in the weekly conferences, and thoroughly understand the examples throughout the chapter.   As before, there are 3 main components of your submission including the problem analysis, program design and documentation, and sample test data.

  1. Using a similar approach as example 3.6 (textbook page 146): “A new Car Price Calculator”, provide your analysis for the following problem statement: You need to write a program that will calculate the total price to purchase all the components required to build a state-of-the-art gaming computer from newegg.com. You will need to conduct some analysis on newegg.com (or amazon.com) regarding the possible options and prices to be considered. However; assume the computer will consist of the following components:

CPU
Case
Power supply
Motherboard
Hard Drive
RAM
DVD
Sound Card
Monitor
Graphics Card
Operating System

I would recommend you keep the option choices limited to 3 different components, or your program will really grow fast. For example, you could provide options for the Operating System (Windows 7, Red Hat Linux), the RAM (4 MB, 8 MB, 12 MB) and the Hard Drive Size (500 GB, 1 TB, 1.5 TB) and leave everything else as a baseline. I leave it up to you to determine which components you want to add options for and for researching the approximate prices. Be sure your prices are fairly realistic.

Your analysis should be clearly written and demonstrate your thought process and steps used to analyze the problem. Be sure to include what is the required output? What is the necessary input and how you will obtain the required output from the given input? Also, include your variable names and definitions. Be sure to describe the necessary formulas and sample calculations that might be needed.

  1. Using a similar approach as example 3.6 (textbook page 146): “A new Car Price Calculator”, provide your program design for the program you analyzed for calculating the total price of your gaming computer.  Be sure to describe the fundamental tasks (i.e., things your program must do) needed to solve the problem so you can use a modular design.  Provide pseudocode of your overall design that includes the Main module and the order of the module calls (see page 148 for an example) and a Hierarchy chart for the computer price calculator (see figure 3.8 page 148). Finally, list all of your pseudocode for each module. (See pages148-150 as an example.)

 

Include header and step comments in your pseudocode, using a similar approach as the example provided in section 2.3 (textbook page 86). See example 2.8 on pages 87-88). 

 

  1. Prepare at least 5 sets of input data (Test data) along with their expected output for testing your program.  Your test data can be presented in the form of a table as was shown in Assignment 1. Be sure that you provide expected output for each test case.
 

 

Rubric Name: Assignment Rubric

 
       

Criteria

Exceeds

Meets

Does not meet

Design

20 points

(18-20 points)

Employs Modularity (including proper use of parameters, use of local variables etc.) most of the time

Employs correct & appropriate use of programming structures (loops, conditionals, classes etc.) most of the time

Efficient algorithms used most of the time

17 points

(15-17 points)

Employs Modularity (including proper use of parameters, use of local variables etc.) some of the time

Employs correct & appropriate use of programming structures (loops, conditionals, classes etc.) some of the time

Efficient algorithms used some of the time

14 points

(0-14 points)

Rarely employs Modularity (including proper use of parameters, use of local variables etc.)

Rarely employs correct & appropriate use of programming structures (loops, conditionals, classes etc.)

Poorly structured and inefficient algorithms

Functionality

40 points

(36-40 points)

Program fulfills all functionality

All requirements were fulfilled

Extra effort was apparent

35 points

(29-35 points)

Program fulfills most functionality

Most requirements were fulfilled

28 points

(0-28 points)

Program does not fulfill functionality

Few requirements were fulfilled

Test

20 points

(18-20 points)

Comprehensive test plan

17 points

(15-17 points)

Good test plan included

14 points

(0-14 points)

No test plan included

Documentation

20 points

(18-20 points)

Excellent comments

Comprehensive lessons learned

Excellent possible improvements included

Excellent approach discussion and references

17 points

(15-17 points)

Good comments

Some lessons learned

Some possible improvements included

Some approach discussion

14 points

(0-14 points)

No comments

No lessons learned

No possible improvements

No approach discussion

Overall Score

Exceed
90 or more

Meets
70 or more

Does not meet
0 or more

EXAMPLE FROM BOOK

 

3.6 Focus on Problem Solving:

A New Car Price Calculator

In each “Focus on Problem Solving” section throughout this textbook, we will develop a longer program that makes use of much of the material in the current chapter. The program developed here contains selection structures and menus to help compute the cost of a new car purchased with various options.

Problem Statement

Universal Motors makes cars. They compute the purchase price of their autos by taking the base price of the vehicle, adding in various costs of different options, and then adding shipping and dealer charges. The shipping and dealer charges are fixed for each vehicle at $500 and $175, respectively, but regardless of the particular model, and the buyer can select the following options: type of engine, type of interior trim, and type of radio. The various choices for each option and the associated prices are listed in Table 3.4.

Table 3.4 Options available for Universal Motors’ vehicles

Engine                                                             Purchase Code                                               Price

6 cylinder                                                                    S                                                          $150

8 cylinder                                                                    E                                                          $475

Diesel                                                                          D                                                          $750

Interior Trim                                                  Purchase Code                                               Price

Vinyl                                                                            V                                                          $50

Cloth                                                                            C                                                          $225   

Leather                                                                        L                                                          $800

Radio                                                              Purchase Code                                               Price

AM/FM/CD/DVD                                                         C                                                          $100

With GPS                                                                     P                                                          $400

 

Universal Motors would like to have a program that inputs the base price of a vehicle and the desired options from the user, and then displays the selling price of that vehicle.

Problem Analysis

This problem has very clearly defined input and output. The input consists of the base price (BasePrice), the engine choice (EngineChoice), the interior trim choice (TrimChoice), and the radio choice (RadioChoice). After the user has entered a choice for an option, the program must determine the corresponding cost of that option: EngineCost, TrimCost, and RadioCost.

The only item output is the selling price (SellingPrice) of the vehicle. To determine sellingprice, the program must also know the fixed value of the shipping and dealer charges (ShippingCharge and DealerCharge). Then the following computation is simple: SellingPrice = BasePrice + EngineCost + TrimCost + RadioCost + ShippingCharge + DealerCharge

 

Program Design

Roughly speaking, the following are the things our program must do:

1.       Input the base price

2.       Process the various option choices to compute additional costs

3.       Total all the costs

4.       Display the final selling price

We will input the base price in the main module and the transfer control to several submodules, one for each available option. Within each submodule, a menu will be displayed allowing the user to enter a choice for that option (See Table 3.4). Then the submodule will use this selection to determine the corresponding option cost. After all the option selections are made, another module will compute the total cost and display the results. Thus the Main module will contain the following submodules.

·         Compute_Engine_Cost

·         Compute_Interior_Trim_Cost

·         Compute_Radio_Cost

·         Display_Selling_Price

 

The hierarchy chart shown in Figure 3.8 shows the program modules and their relationship to one another. We now describe each of the modules in more detail.

Main Module

This module displays a welcome message, inputs the base price, and calls the other modules. In the Main module we also declare all the variables that will be used by more than one module. The pseudocode for the Main module follows:

 

We give our students 100% satisfaction with their assignments, which is one of the most important reasons students prefer us to other helpers. Our professional group and planners have more than ten years of rich experience. The only reason is that we have successfully helped more than 100000 students with their assignments on our inception days. Our expert group has more than 2200 professionals in different topics, and that is not all; we get more than 300 jobs every day more than 90% of the assignment get the conversion for payment.

Place Order Now

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational