Program:  Circle.h and newCircle.cpp 1: Create a class specification file, Circle.h, that contains the Circle class declaration 2: Create a class implementation file, Circle.cpp, that contains the member function definition, with a constructor that can accept arguments 3. Based on Program 13-8 in the textbook, create a program, newCircle.cpp, that generate two instances of the Circle class, pizza1 and pizza2, which can have different size (radius).     Hint: Use the example source code in “Rectangle Version 4.zip” to create a multi-file project. Step 1: In Dev-C++, go to file à New à Project to create an empty project Setp 2: Go to ProjectàAdd to project, add new cpp files (e.g. Rectangle.cpp and Pr13-8.cpp files). Step 3: Compile and run

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

Program:  Circle.h and newCircle.cpp

1: Create a class specification file, Circle.h, that contains the Circle class declaration

2: Create a class implementation file, Circle.cpp, that contains the member function definition, with a constructor that can accept arguments

3. Based on Program 13-8 in the textbook, create a program, newCircle.cpp, that generate two instances of the Circle class, pizza1 and pizza2, which can have different size (radius).  

 

Hint: Use the example source code in “Rectangle Version 4.zip” to create a multi-file project.

  • Step 1: In Dev-C++, go to file à New à Project to create an empty project
  • Setp 2: Go to ProjectàAdd to project, add new cpp files (e.g. Rectangle.cpp and Pr13-8.cpp files).
  • Step 3: Compile and run

 

Problem 2:

 

Read the example source code in “HW2Problem2.zip” and modify it as follows:

  

1. Modify the code and create three rectangle objects, box1, box2, and box3.

 

2. Modify the code and create some static member function(s) that can count the number of objects created.

 

3. Modify the code so that each rectangle object will have a price that is based on the area of the box: . Modify static member function, getTotal, so that it can still compute the total price for all existing objects. (Note: the example only gives fixed price for each box.)

Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY