C++ for Engineers and Scientists
4th Edition
ISBN: 9781133187844
Author: Bronson, Gary J.
Publisher: Course Technology Ptr
expand_more
expand_more
format_list_bulleted
Question
thumb_up100%
Draw the hierarchy chart and design the logic for a
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 3 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Pls answer the 2 given subpartarrow_forwardJava Language The company will held its quarterly performance for each department; wherein each group of the department are rated from 1 to 5, where 1 is the lowest score and 5 is the highest score. The department has two groups, groupA and groupB. Each group will be rated by five evaluators. Create a program that will ask for the input rate of the evaluators, and determine the group that got the highest rating, as well as the overall rating of the department. Use the UML diagram below as a reference. Department() – accepts 5 ratings of the evaluators and determines the groupScore which is the total rating of the group. getGroupAverage() – returns the value of groupAverage which is the average score of the group. displayAverage() – displays the overAllAverage which is the average of the whole department. overAllScore is the over all score of the department. Department Group Score: Int Group Average : Double Overall Score: int overall Average: double Department()…arrow_forwardVoltage readings are obtained from an electrical substation once every hour for six hours (so there are sixreadings). Write a program to perform the following checks on the substation:i) display all voltages that differ from the average by more than 10% of the average.ii) display all pairs of consecutive hours where the change from the voltage at one hourto the next is greater than 15% of the average.arrow_forward
- (Data processing) Your professor has asked you to write a C++ program that determines grades at the end of the semester. For each student, identified by an integer number between 1 and 60, four exam grades must be kept, and two final grade averages must be computed. The first grade average is simply the average of all four grades. The second grade average is computed by weighting the four grades as follows: The first grade gets a weight of 0.2, the second grade gets a weight of 0.3, the third grade gets a weight of 0.3, and the fourth grade gets a weight of 0.2. That is, the final grade is computed as follows: 0.2grade1+0.3grade2+0.3grade3+0.2grade4 Using this information, construct a 60-by-7 two-dimensional array, in which the first column is used for the student number, the next four columns for the grades, and the last two columns for the computed final grades. The program’s output should be a display of the data in the completed array. For testing purposes, the professor has provided the following data:arrow_forwardWhen you borrow money to buy a house, a car, or for some other purpose, you repay the loan by making periodic payments over a certain period of time. Of course, the lending company will charge interest on the loan. Every periodic payment consists of the interest on the loan and the payment toward the principal amount. To be specific, suppose that you borrow $1,000 at an interest rate of 7.2% per year and the payments are monthly. Suppose that your monthly payment is $25. Now, the interest is 7.2% per year and the payments are monthly, so the interest rate per month is 7.2/12 = 0.6%. The first months interest on $1,000 is 1000 0.006 = 6. Because the payment is $25 and the interest for the first month is $6, the payment toward the principal amount is 25 6 = 19. This means after making the first payment, the loan amount is 1,000 19 = 981. For the second payment, the interest is calculated on $981. So the interest for the second month is 981 0.006 = 5.886, that is, approximately $5.89. This implies that the payment toward the principal is 25 5.89 = 19.11 and the remaining balance after the second payment is 981 19.11 = 961.89. This process is repeated until the loan is paid. Write a program that accepts as input the loan amount, the interest rate per year, and the monthly payment. (Enter the interest rate as a percentage. For example, if the interest rate is 7.2% per year, then enter 7.2.) The program then outputs the number of months it would take to repay the loan. (Note that if the monthly payment is less than the first months interest, then after each payment, the loan amount will increase. In this case, the program must warn the borrower that the monthly payment is too low, and with this monthly payment, the loan amount could not be repaid.)arrow_forward(Civil eng.) Write a C++ program to calculate and display the maximum bending moment, M, of a beam that’s supported on both ends (see Figure 3.8). The formula is M=XW(LX)/L, where X is the distance from the end of the beam that a weight, W, is placed, and L is the beam’s length. You program should produce this display: The maximum bending moment is xxxx.xxxx The xxxx.xxxx denotes placing the calculated value in a field wide enough for four places to the right and left of the decimal point. For your program, assign the values1.2,1.3,and11.2toX,W,andL.arrow_forward
- (Civil eng.) Write an assignment statement to calculate the linear expansion in a steel beam as a function of temperature increase. The formula for linear expansion, l, is as follows: l=l0(1+(TfT0)) l0isthelengthofthebeamattemperatureT0.isthecoefficientoflinearexpansion.Tfisthefinaltemperatureofthebeam.arrow_forward6 Can you please help me with a and b: a. Draw the hierarchy chart and then plan the logic for a program that calculates a person's body mass index (BMI). BMI is a statistical measure that compares a person's weight and height. The program uses three modules. The first prompts a user for and accepts the user's height in inches. The second module accepts the user's weight in pounds and converts the user's height to meters and weight to kilograms. Then, it calculates BMI as weight in kilograms divided by height in meters squared, and displays the results. There are 2.54 centimeters in an inch, 100 centimeters in a meter, 453.59 grams in a pound, and 1,000 grams in a kilogram. Use named constants whenever you think they are appropriate. The last module displays the message End of job.b. Revise the BMI-determining program to execute continuously until the user enters 0 for the height in inches.arrow_forwardPYTHON PROGRAMMINGarrow_forward
- Suppose you own a beer distributorship that sells Piels (ID number 1), Coors (ID number 2), Bud (IDnumber 3), and Iron City (ID number 4) by the case. Write a C language program to1. Get the case inventory for each brand for the start of the week.2. Process all weekly sales and purchase records for each brand.3. Display out the final inventory.Each transaction will consist of two data items. The first item will be the brand ID number (an integer).The second will be the amount purchased (a positive integer value) or the amount sold (a negative integervalue). For now you may assume that you always have sufficient foresight to prevent depletion of yourinventory for any brand. (Hint: Your data entry should begin with four values representing the caseinventory, followed by the transaction values.)arrow_forwardThis exercise is for a simplified supermarket cash register system. The normal procedure for using the cash register is as follows:• A customer arrives at the checkout with items to pay.• The cashier records the identification number of each item, as well as the quantity if it is greater than one.• The checkout displays the price of each item and its description.• When all purchases are recorded, the cashier signals the end of the sale.• The cash register displays the total purchases.• The customer chooses his method of payment:✓ cash: the cashier collects the money received; the cashier indicates the currency to be returned to the customer;✓ check: the cashier checks the creditworthiness of the customer by transmitting a request to an authorization center via the cashier;✓ credit card: a bank terminal is part of the cash register. It transmits an authorization request to an authorization center according to the type of card.• The cash register registers the sale and prints a receipt.•…arrow_forwardA hotel has a certain number of rooms. Each room can be either single bed or double bed type and may be AC or non-AC type. The rooms have different rates depending on whether they are of single or double, AC or Non-AC types. The room tariff however may vary during different parts of the year depending up on the occupancy rate. For this, the computer should be able to display the average occupancy rate for a given month, so that the manager can revise the room tariff for the next month either upwards or downwards by a certain percentage. Perform structured analysis and structured design for this Hotel Automation Software—software that would automate the book keeping activities of a 5-star hotel.Guests can reserve rooms in advance or can reserve rooms on the spot depending upon availability of rooms. The receptionist would enter data pertaining to guests such as their arrival time, advance paid, approximate duration of stay, and the type of the room required. Depending on this data and…arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- C++ for Engineers and ScientistsComputer ScienceISBN:9781133187844Author:Bronson, Gary J.Publisher:Course Technology PtrProgramming Logic & Design ComprehensiveComputer ScienceISBN:9781337669405Author:FARRELLPublisher:CengageC++ Programming: From Problem Analysis to Program...Computer ScienceISBN:9781337102087Author:D. S. MalikPublisher:Cengage Learning
C++ for Engineers and Scientists
Computer Science
ISBN:9781133187844
Author:Bronson, Gary J.
Publisher:Course Technology Ptr
Programming Logic & Design Comprehensive
Computer Science
ISBN:9781337669405
Author:FARRELL
Publisher:Cengage
C++ Programming: From Problem Analysis to Program...
Computer Science
ISBN:9781337102087
Author:D. S. Malik
Publisher:Cengage Learning