PRF193_PE_SU25_B1_121891_3985.webp
Yuno_76

PRF193_PE_SU25_B1_121891_3985.webp

  • Media owner Yuno_76
  • Ngày thêm
☑Kizspy.me
Question 6:
(2 mark, file to be edited: Q6.cpp)
Write a program to manage books using object-oriented programming.
Requirements:
1. Define a Circle class (placed in the same file containing the main() function) with:
o Two attributes: id (int), radius (float).
o A constructor to initialize all attributes.
o A method area() to calculate the area.
o A method perimeter() to calculate the perimeter.
2. In the main() function:
o Read circle's information from the keyboard.
o Create a circle object and show it's its area and perimeter.
Below is an example:
Enter id=1; radius=2.5
Zoom
- FUO
+ 100%
Close
Chưa có bình luận nào.

Thông tin

Category
PRF193
Thêm bởi
Yuno_76
Ngày thêm
Lượt xem
1,197
Lượt bình luận
0
Rating
0.00 star(s) 0 đánh giá

Share this media

Back
Bên trên Bottom