Computer Science, asked by arukishu, 11 months ago

write the full program in javacode which can be compiled directly in complier
plz i need help
10. A super class Number is defined to calculate the factorial of a number. Define a sub class Series to find the sum
of the series S = 1! + 2! + 3! + 4! + ........ + n ! 5
The details of the members of both the classes are given below :
Class name : Number
Data member/instance variable :
: to store an integer number
Member functions / methods :
Number(int nn) : parameterized constructor to initialize the data member n = nn
int factorial(int a) : returns the factorial of a number
(factorial of n = 1 × 2 × 3 × ..... × n)
void display ( ) : displays the data members
Class name : Series
Data member/instance variable :
sum : to store the sum of the series
Member functions/methods :
Series(...) : Parameterized constructor to initialize the data members of both
the classes
void calsum( ) : calculates the sum of the given series
void display( ) : displays the data members of both the classes

Answers

Answered by mohammadumar1622
0

Answer:

I not know .....

.............

Answered by nedhabintshabeer
2

Answer:

row

Explanation:

Similar questions