
Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
Use c programming for the following question. And plz don't use any other libraries other than # include < stdio.h >

Transcribed Image Text:4. A lumber company needs to compute the values of certain engineering properties of its rectan-
gular cross section lumber. The dimensions of the wood are given as base and height in inches
as integers. The required engineering properties are
24
48
66
cross sectional area = base x height
4
2 x
4 x 8
6 x 6
moment of inertia =
Write a program which reads the base and height from the input file, lumberin. txt, then calls
three functions area(), inertia(), and modulus () to compute the values of the required
engineering properties. The main program then writes the three values to the output file
lumberout.txt. This continues until the end of the input file is reached.
Area
section modulus =
Note that you must write your functions so that modulus () calls area() and inertia()
calls modulus ().
For example, if the file lumberin. txt consists of:
8.00
32.00
36.00
base x height³
12.0
then the output e lumberout.txt would consist of:
Lumber Size
Cross sectional
Moment of
Inertia
base x height²
6.0
10.67
170.67
108.00
Section
Modulus
5.33
42.67
36.00
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 3 steps with 1 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
- Please us c++ to make the code thank you very much!arrow_forwardI need help with this assignment, I need to make a struct to implement a limited Python style list in C++. When you bootstrap the exercise, you will be given a main.cpp file, with a simple program written in it. The program declares a Python style list and appends several elements to it, before printing it out to the terminal. The file is where I would setup my code #ifndef PY_LIST_H #define PY_LIST_H #include <iostream> struct PyList { // Declare your vars here PyList(){ // Implement this } void append(int x){ // Implement this } void append(char x){ // Implement this } void append(float x){ // Implement this } ~PyList(){ // Implement this } }; std::ostream& operator<<(std::ostream& os, const PyList& pyList){ os << '['; // Complete this implementation os << ']'; return os; } #endif Here is the main.cpp file that it must be able to run and the float must not have floating zeros #include <iostream> #include "PyList.h"…arrow_forwardUsing C++ Using your own creativity, make a set of function templates that have these features: This function must return a value. A function template with 1 template parameter, T. And, any other parameters you want. and then another function template but this time with 2 template parameters, T1 and T2. And, any other parameters you want.arrow_forward
- Suppose that you have the following recursive function written in C++. I've intentionally written the function so that it doesn't use descriptive names for anything, though that's obviously not a good design practice, but I aim not to bias your understanding of the techniques you'll be using by assuming anything about what the function's goal is; to stay "on task" here, you should resist the temptation to try to figure that out first. void kaboom( const std::vector& v, std::vector& w, unsigned int i) { if (i < w.size()) { int q = 0; for (int j : v) { q += j; } w.at(i) - kaboom(v, w, i + 1); } = q; } 1. Using the techniques from our discussion of the Asymptotic Analysis of Recursion, write a recurrence that describes the time required to run the following call to kaboom for two vector v and w whose sizes are the same. Use the variable s in your recurrence to denote that size. kaboom(v, w, 0) 2. Using the repeated substitution technique, reduce the recurrence to a closed form, then give…arrow_forwardIs it better to break up the long programme into smaller modules, each of which carries out a certain function? In the C++ programming language, these portions are called functions. Is there anything more you'd want to say about this?arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education

Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education

Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON

Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON

C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON

Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning

Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education