Showing posts from December, 2021Show all
Accept the names of two files and copy the contents of the first to the second. First file having Book name and Author name in file. Second file having the contents of First file and also add the comment ‘end of file’ at the end.
 Write a program to read a text file “sample.txt” and display the contents of a file in reverse order and also original contents change the case (display in upper case).
Define a class patient (patient_name, patient_age, patient_oxy_level,patient_HRCT_report). Create an object of patient. Handle appropriate exception while patient oxygen level less than 95% and HRCT scan report greater than 10, then throw user defined Exception “Patient is Covid Positive(+) and Need to Hospitalized” otherwise display its information.
 Write a program to using marker interface create a class product(product_id, product_name, product_cost, product_quantity) define a default and parameterized constructor. Create objects of class product and display the contents of each object and Also display the object count.
Create an abstract class “order” having members id,description.Create two subclasses “Purchase Order” and “Sales Order” having members customer name and Vendor name respectively.Define methods accept and display in all cases. Create 3 objects each of Purchase Order and Sales Order and accept and display details.
 Define an abstract class Staff with protected members id and name. Define a parameterized constructor. Define one subclass OfficeStaff with member department. Create n objects of OfficeStaff and display all details
Write a program for multilevel inheritance such that country is inherited from continent. State is inherited from country. Display the place, state, country and continent.
Load More That is All