Computer Science, asked by aa5a, 3 months ago

*Use Console Input (import java.io.*) not Scanner*

Write a program to define a class name
mobike
With the following description:-

Instance variable or data members:
int bno
To store the bike number
int phno
To store the phone number of the customer
String name
To store the name of the customer
int days
To store the number of days the bike is taken on rent
int charge
To calculate and store the rental charge

Member methods:
1-mobike()
Parametrized constructor to accept the data members to be inputted
2-void input()
To input and store the details of the customer
3-void compute()
to compute the rental charge for a mobile on the following basis:

Days-rent
First 5days-Rs500 per day
Next 5days-Rs400 per day
Rest of the days -Rs200 per day

4-void display()
To display the detail as bike number ,phone number ,number of days and charge.

Invoke the function through object.

Answers

Answered by shashidubey1119
1

Explanation:

Section: SE(D)

classes implement software management and control functions that enable the system to operate and communicate within it's computing environment and with

outside world

A. O

User Interface classes

B. O

Business Domain classes

C. O

System classes

D. O

Process classes

ਦੀ

Similar questions