This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
haas:fall2024:cprog:projects:oop0 [2024/11/06 19:31] – created - external edit 127.0.0.1 | 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===== | ||
Line 132: | Line 122: | ||
*:oop0:no compiler messages, program compiles and runs without issue [52/52] | *:oop0:no compiler messages, program compiles and runs without issue [52/52] | ||
*: | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
+ | *: | ||
</ | </ | ||