Problem Solving with C++ Plus MyLab Programming with Pearson eText -- Access Card Package (10th Edition)
Problem Solving with C++ Plus MyLab Programming with Pearson eText -- Access Card Package (10th Edition)
10th Edition
ISBN: 9780134710747
Author: Walter Savitch
Publisher: PEARSON
Question
Book Icon
Chapter 7, Problem 12PP
Program Plan Intro

Program Plan:

  • Include the appropriate headers into program.
  • Declare the constant variables and functions.
  • Declare the function prototypes.
  • Define the “main()” function.
    • Declare the variable “production[]” in type of integer.
    • Print the value.
    • Call the functions with appropriate arguments.
    • Return statement.
  • Define the function “graph()” with its arguments.
    • Declare the appropriate variables.
    • Declare the array variable in type of “char”.
    • Using “for” loop, assign “*” and “ ” to array.
    • Using “for” loops, print the values on screen.
  • Define the function “scale()” with its arguments.
    • Using “for” loop, call the “roundNum()” function to save value to array.
  • Define the function “getTotal()” with its arguments.
    • Prompt the value from user.
    • Using “for” loop, add the values and store into “total” variable.
  • Define the function “inputData()” with its arguments.
    • Using “for” loop, get the “plantNumber” from user.
    • Call the “getTotal()” function with arguments.
  • Define the function “roundNum()” with its arguments.
    • Return the rounded value.

Blurred answer
Students have asked these similar questions
Write a Java program that would resemble a power utility billing system. There will be an input window that would enter or input the meter number (5 numeric digits) and the present meter reading in kilowatt-hours, the maximum would be 9999 kilowatts. A search from a 2d-ArrayList would be made in order to get the previous meter reading of a particular meter number. The 2d- ArrayList consists of meter number (5 numeric digits) and the previous meter reading in kilowatt-hours (4 numeric digits with 9999 as a maximum value). Provide at least 5 sample data or 5 rows with meter numbers and previous meter reading for each row for the 2d-ArrayList. When an input of meter number and present meter reading is made, search the 2d-ArrayList for the equivalent meter number. If a match is found, get the kilowatt-hour used (KWH) by subtracting the previous meter reading from the present meter reading. Note that if the present meter reading is less than the previous meter reading, add 10000 first to…
Implement the"paint fill"function that one might see on many image editing programs. That is, given a screen (represented by a two-dimensional array of colors), a point, and a new color, fill in the surrounding area until the color changes from the original color.
Write a Java program that would resemble a payroll system. An input window which will accept the employee number and the number of days of rendered work. A 2d-arraylist that contains the employee number and the rate per day is to be searched and used to compute for the gross salary. Gross salary is computed by multiplying the number of days of rendered work by rate per day of the particular employee. If the gross salary computed is greater than 100,000 the tax is 20% of the gross salary, otherwise, the tax is 10%. Deduct the tax from the gross salary to get the net pay. Display the employee number, gross salary, tax deduction, and the net pay in an output window. Design your own input/output windows. ( USE OOP CONCEPT AND JOPTION)

Chapter 7 Solutions

Problem Solving with C++ Plus MyLab Programming with Pearson eText -- Access Card Package (10th Edition)

Ch. 7.2 - Consider the following function definition: void...Ch. 7.2 - Prob. 12STECh. 7.2 - Write a function definition for a function called...Ch. 7.2 - Consider the following function definition: void...Ch. 7.2 - Insert const before any of the following array...Ch. 7.2 - Write a function named outOfOrder that takes as...Ch. 7.3 - Write a program that will read up to ten...Ch. 7.3 - Write a program that will read up to ten letters...Ch. 7.3 - Following is the declaration for an alternative...Ch. 7.4 - Prob. 20STECh. 7.4 - Write code that will fill the array a (declared...Ch. 7.4 - Prob. 22STECh. 7 - Write a function named firstLast2 that takes as...Ch. 7 - Write a function named countNum2s that takes as...Ch. 7 - Write a function named swapFrontBack that takes as...Ch. 7 - The following code creates a small phone book. An...Ch. 7 - There are three versions of this project. Version...Ch. 7 - Hexadecimal numerals are integers written in base...Ch. 7 - Solution to Programming Project 7.3 Write a...Ch. 7 - Prob. 4PPCh. 7 - Write a program that reads in a list of integers...Ch. 7 - Prob. 6PPCh. 7 - An array can be used to store large integers one...Ch. 7 - Write a program that will read a line of text and...Ch. 7 - Write a program to score five-card poker hands...Ch. 7 - Write a program that will allow two users to play...Ch. 7 - Write a program to assign passengers seats in an...Ch. 7 - Prob. 12PPCh. 7 - The mathematician John Horton Conway invented the...Ch. 7 - Redo (or do for the first time) Programming...Ch. 7 - Redo (or do for the first time) Programming...Ch. 7 - A common memory matching game played by young...Ch. 7 - Your swim school has two swimming instructors,...Ch. 7 - Your swim school has two swimming instructors,...Ch. 7 - Prob. 19PPCh. 7 - The Social Security Administration maintains an...
Knowledge Booster
Background pattern image
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning