CLASS 10 ICSE SPECIMEN 2024 QUESTION-3

Опубликовано: 18 Октябрь 2024
на канале: Alex Sir
461
11

Define a class called with the following specifications:
Class name: Eshop
Member variables:
String name: name of the item purchased
double price: Price of the item purchased
Member methods:
void accept(): Accept the name and the price of the item using the methods of Scanner
class.
void calculate(): To calculate the net amount to be paid by a customer, based on the
following criteria:
Price Discount
1000 – 25000 5.0%
25001 – 57000 7.5 %
57001 – 100000 10.0%
More than 100000 15.0 %
void display(): To display the name of the item and the net amount to be paid.
Write the main method to create an object and call the above methods.

Question 3 Specimen 2024
https://alexsir.com/class10-icse-java...