Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Instructions: Copy and paste your programs below each respective questions. Keep also screen shots of your sample input and output screens after your program codes.

Instructions:
Copy and paste your programs below each respective questions. Keep also screen shots of your sample input and output screens after your program codes. Save and submit your file in Moodle 5 to 10 minutes before the time.
1) Write a Java program that will input user in an Online Banking registration. (5*1=5marks)
a) The program should allow user to enter any 3 information of the user and 2 bank details that may be needed for the next requirements.
b) It must assign and display the registration fee which is 12.500 rials for new and 6.700 rials for old customers.
c) The program should allow to enter another user or to make multiple/many registrations.
d) Display all information entered and processed in this program.
e) Include other required statements to run the Taxi Booking program properly.
2) Oman Pharmacy has announced offers on their products to customers during COVID-19 pandemic. (20marks)
Write Java program with the following requirements:
a) Create a superclass for the Pharmacy with the following requirements:(1mark)
Member variables: pharmacyBranch, pharmacyCode and contactNumber
(1mark)
Member methods to:
declare constructors to initialize the variables(1mark)
assign and display the products on offer based on the pharmacyCode as follows: (2marks)
pharmacyCodeproductsOnOffer
M or mMasks
F or fFace Sheilds
Other IDsVitamins
display all the super class variables(1mark)
b) Create a subclass named Products inherited from the superclass with requirements below:(1mark)
Member variables: productID, productPrice, number of items(1.5marks)
Member methods to:
declare constructor to invoke superclass constructor and initialize the subclass variables (1.5marks)
display all the subclass variables(1mark)
calculate and display discount price based on the table below: (2marks)
productIDdiscountPrice
125% of the productPrice
4512% of the productPrice
Others20% of the productPrice
calculate and display the total price which is productPrice - discountPrice(1 mark)
calculate and return the total price to pay which total price * number of items
(1mark)
c) Create 1 object for both the super class and the sub class then call all methods to display all the member variables and all the expected outputs.(5 marks)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Watson Watson

5th Edition

0471715360, 978-0471715368

More Books

Students also viewed these Databases questions

Question

9. Mohawk Industries Inc.

Answered: 1 week ago

Question

8. Satyam Computer Services Limited

Answered: 1 week ago

Question

2. Explain how the role of training is changing.

Answered: 1 week ago