Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Module 0 6 Lab - Computer Information ( Functions ) Instructions: Please stay away from the internet to find answers. Everything you need for the

Module 06 Lab - Computer Information (Functions)
Instructions:
Please stay away from the internet to find answers. Everything you need for the labs can be found in the class material, particularly the textbook and the lecture video. There are many bad codes on the internet. Students in an introductory programming class cannot easily distinguish between proper codes and "garbage".
Create an e application to get information for a computer. Ask the user for the speed of the processor, storage capacity, RAM amount, and if it is touchscreen. Then, display the computer information. You will need three functions.
Function Requirements:
One function to get the information from the user (Hint: pass arguments by reference).
One function to calculate the price.
The base cost of the computer is $150.
Add $50 to the cost for each GHz of processor speed over 2 GHz.
If the storage is above 500 GB, add $40.
Add $5 for each GB of RAM over 4 GB.
Add $60 for touchscreen.
Calculate the price based on 75% markup. Price = cost + markup * cost.
One function to display the following information:
The speed of the processor, storage capacity, RAM amount, touchscreen or not, and price.
More Requirements:
Follow all general requirements we have used in previous labs, including telling the user what the program does. Follow all variable naming rules and conventions.
All variables for speed, storage, RAM, and touchscreen must be created in the main function.
Constant variables can be global, otherwise, absolutely, positively, NO GLOBAL VARIABLES can be used.
The functions that get information and display information must be called by the main function. You decide where the calculation function is called. You also decide about the parameters and return types of all functions. Use a char variable for touchscreen.
After computer info is displayed, ask the user if they want to create another one. If the answer is yes, repeat the prompts and display the information.
Perform complete error checking. Do not accept zero or negative numbers.
Please code piece by piece. Test each function before you go to the next one. That is the only way programming works.

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_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

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

Get Started

Recommended Textbook for

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions