Define a class called Bookorder
Instance variable :
String title: To store title of the book
double weight : To store weight of the book
double cost : To store cost one book
double totalbooks : To store total numbered of books order
Methods()
Bookorder() : Default constructor to initialize data members to default values void input() : To input all related values
void calculate() : Find total weight and total cost
total weight ; total books * weight;
total cost = total books * weight;
total cost = total books * cost;
Write main method and call all above member method.
Spammers stay away!
Answers
Answered by
1
Instance variable :
String title: To store title of the book
double weight : To store weight of the book
double cost : To store cost one book
double totalbooks : To store total numbered of books order
Methods()
Bookorder() : Default constructor to initialize data members to default values void input() : To input all related values
void calculate() : Find total weight and total cost
total weight ; total books * weight;
total cost = total books * weight;
total cost = total books * cost;
Write main method and call all above member
Answered by
5
Answer:
hii mate plz thank my answer and Mark as brainliest
Similar questions
Computer Science,
2 months ago
Math,
2 months ago
Computer Science,
2 months ago
Chemistry,
5 months ago
Science,
5 months ago
English,
10 months ago