Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Need help on these C++ short answers. If you help, thank you so much!! Q2 Define a struct computerType to store the following data about

Need help on these C++ short answers. If you help, thank you so much!!

image text in transcribed

Q2 Define a struct computerType to store the following data about a computer: Manufacturer (string), model type (string), processor type (string), ram (int) in GB, hard drive size (int) in GB, year when the computer was built (int), and the price (double). Q3 Consider the declaration of the struct houseType given in this chapter. Write C++ statements to do the following: a) Declare variables oldHouse and newHouse of type houseType. b) Store the following information into oldHouse: Style-Two-story, number of bedrooms 5, number of bathrooms 3, number of cars garage 4, year built1975 , finished square footage-3500, price 675000, and tax=12500. c) Copy the values of the components of old douse into the corresponding components of newHouse. Q4 Define a struct fruitType to store the following data about a fruit: Fruit name (string), color (string), fat (int), sugar (int), and carbohydrate (int). Q5 Assume the definition of Q4. a) Write a C++ function, getFruitInput to read and store data into a variable of fruittype. b) Write a C++ function, printFruittnfo to output data stored into a variable of fruitType. Use appropriate labels to identify each component

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

Step: 3

blur-text-image

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

Expert Oracle Database Architecture

Authors: Thomas Kyte, Darl Kuhn

3rd Edition

1430262990, 9781430262992

More Books

Students also viewed these Databases questions