HomeWork - 05
HomeWork - 05
Submitted To:
Dr. Md. Ezharul Islam
Associate Professor
Dept. of CSE.
Jahangirnagar University.
Submitted By:
Shantanu Mazumder
Student Roll: CSE202101154
Jahangirnagar University
CSE, PMSCS.
Level 1 Programming Exercise:
9. One million is 106 and 1 billion is 109. Write a program that reads a power of 10 (6, 9, 12,
etc.) and displays how big the number is (Million, Billion, etc.). Display an appropriate message
for the input value that has no corresponding word. The table below shows the correspondence
between the power of 10 and the word for that number.
else
15. Define a class called Triangle that is capable of computing the perimeter and area of a
triangle, given its three sides a, b, and c, as shown below. Notice that side b is the base of the
triangle.The design of this class is identical to that for the Ch5Circle class from Section 5.1.
Define a private method isValid to check the validity of three sides. If any one of them is invalid,
the methods getArea and getPerimeter will return the constant INVALID_DIMENSION.
17. At the end of movie credits you see the year movies are produced in Roman numerals, for
example, MCMXCVII for 1997. To help the production staff determine the correct Roman
numeral for the production year, write a program that reads a year and displays the year in
Roman numerals.
Discount
5% - $ 11.83
Boxes Used:
1 Large - $1.80
2 Medium - $2.00