Write a class LocalPhone that contains an attribute phone to store a local telephone
number. The class contains member functions to input and display phone number.
Write a child class NatPhone for national phone numbers that inherits LocPhone
class. It additionally contains an attribute to store city code. It also contains member
functions to input and show the city code. Write another class IntPhone for
international phone numbers that inherit NatPhone class. It additionally contains an
attribute to store country code. It also contains member functions to input and show
the country code. Test these classes from main() by creating objects of derived
classes and testing functions in a way that clear concept of multi-level Inheritance
Write a program having a base class Student with data member rollno and
member functions getnum() to input rollno and putnum() to display rollno. A class
Test is derived from class Student with data member marks and member functions
getmarks() to input marks and putmarks() to display marks. Class Sports is also
derived from class Student with data member score and member functions getscore()
to input score and putscore() to display score. The class Result is inherited from two
base classes, class Test and class Sports with data member total and a member
function display() to display rollno, marks, score and the total(marks + score).
Write a class Teacher that contains the attribute teacher name, age and address. It
also contains member function to input and display its attributes. Write another class
Author that contains the attributes author name, address and number of books written
by him. It also contains member functions to input and display its attributes. Write a
third class Scholar that inherits both Teacher and Author classes. Test these classes
from main() by creating objects of derived classes and testing functions in a way that
clear concept of multiple Inheritance.
Create a class Person having name, age and gender as its data members. Create
another class Employee which has employername and dailywages as it data member.
From these two classes derive another class teacher which contains teacher grade as
data member.
i. Write set and get functions to enter and display the data members.
ii. Write main function to implement these classes. Enter the teacher data to show
multiple inheritance.
Create a Class named base which has two data members. Then derive a class
derived1 from base class which has one data members. Derive a class derived2 from
derived1.
i. Write functions for each class to get and display values.
ii. Write main() function to create object of derived2 and through that object
access the data member of base class and derived1 class
Initialize a 10 bit number “num” of reg data type with a value 0 (i.e. num=10’b0000000000), now
make use of for loop to get the output result as num=10’b001100110011 (Note: It is mandatory to
use for loop for getting this output)
Plz send me the the programme in c language
Write a algorithm to find the total number of units of memory allocated Or deallocated by the server 1 after processing all the requests
Design a form for booking accommodation through a rental website (20 marks)
The form should have the following fields:
Use Java script to validate all the fields.
Select
First Name
Last Name
Arrival Date
Departure Date
Country
Submit
Payment mode
Debit card Credit card
Reset
Submit button should enter all the fields’ data to the database.
Error message should be shown if a text field is left blank.
Reset button resets all the fields to the blank.
Design a check box for selecting a payment mode.
Design a drop down list for selecting a country field.
2. Write a python program that will be used for conversion. The Users
should have three choices for conversion:
1. Celsius to Fahrenheit
2. Meter to Feet
3. Seconds to Hours and Minutes
If the user selects 1, the program should ask the user to enter the value
in Celsius and convert to Fahrenheit.
If the user selects 2, the program should ask the user to enter the value
in meter and the program calculates the equivalent feet.
If the user selects 3, the program should ask the user to enter the
number of seconds and calculates the number of hours and minutes.
Example
450 seconds is equivalent to 0 hours, 7.5 minutes
4050 seconds is equivalent to 1 hours, 7.5 minutes
1. Write a Python program for a guessing game. The program allows the
user to enter a number to guess a secret number. Assuming that the
secret number is 143, it provides a feedback that will display a message
“ Congratulation !!!You got the number...” if the user successfully
guessed the secret number otherwise it will display a message “Sorry,
better luck next time..”.(you can assign any number for the secret
number)
Sample outputs(assuming the secret number is 143)
Enter your guess number: 123
Sorry, better luck next time…
Enter your guess number : 143
Congratulation !!!You got the number..