This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
haas:fall2024:cprog:projects:oop0 [2024/11/06 20:06] – [Submission] wedge | haas:fall2024:cprog:projects:oop0 [2024/11/06 20:08] (current) – [Program] wedge | ||
---|---|---|---|
Line 93: | Line 93: | ||
=====Program===== | =====Program===== | ||
- | Write a program that creates one or more of the following classes: | + | Write a program that: |
- | * rectangle | + | * creates one or more classes. |
- | * triangle | + | * That contains, in addition to at least 2 constructors (parameterless, |
- | * trapezoid | + | * utilizes inheritance |
+ | * utilizes access control, and makes use of private member data | ||
- | That contains, in addition to at least 2 constructors (parameterless, | + | Have a main() function that instantiates an instance of your chosen class, and runs that instantiated object through a range of tests demonstrating the class works as intended (likely also prompting the user to input values to configure the attributes of the object). |
- | + | ||
- | * getLength() | + | |
- | * getWidth() | + | |
- | * setLength() | + | |
- | * setWidth() | + | |
- | * area() | + | |
- | * perimeter() | + | |
- | + | ||
- | Store **length**, **width**, and any other pertinent core values as **private**, | + | |
- | + | ||
- | Have a main() function that instantiates an instance of your chosen | + | |
=====References===== | =====References===== |