Write
a
program
in C++ to
display all ‘N’
arithmetic means between the consecutive elements of the
sum of Concatenated and Multiplexed versions of A1[R]
and A
2[R] entered by
a
user.
Consider the following relations:
EMP_NO EMP_NAME EMP_GRADE EMP_SAL EMP_CON DEPT_NO START_DATE
EMP
STD_NO STD_NAME STD_FATHER_NAME CLASS DEPT_NO
STD
a) Display all record of those STD whose name 3rd character is A or H or E?
b) Write query to display employee’s name and salary after the increment of 1232?
c) Display the employee’s name, employee No and start date of employees hired between February 1990, and December 1990. Order the query in ascending order by start date.
d) Display the employee Name and department number of all employees who work in department 22 and 11.
e) Display the name and salary of all employees who do not have a grade.
write a c++ program to create a class called date that has separate member data for day month year one constructor should initialize
this data to 0 and another should initialize it to fixed values .another member function should display it The final member function
should add two objects of type date passed as arguments. A main() program should create two initialized date objects(among these one
should contain today's date andanother one should contain your date of birth) and one that isn’t initialized. Then it should compare
the two initialized values together, leaving the result in the third date variable. Finally it should display the value of this
third variable. Make appropriate member functions const.
write a program for conversion from decimal to binary ,octal and hexadecimal .the program should be developed as follows:
(a).the base class convert has two variables initial and result in which initial is a number before conversion and result is
after conversion.
(b). it has two member functions getinit() and getconv() which return the initial value and converted value respectively.
(c). write a function compute which is a pure virtual function that actually does the conversion.
(d). separate derived classes for hexadecimal ,binary, octal, does the conversion by implementing the function compute.
(e). create the objects for each class using new operator.
(f). use the convert class type pointer to call the compute functions of the derived classes.
Using the code stub below, write a statement that assigns numCoins with numNickels + numDimes. E.g.,: 5 nickels and 6 dimes results in 11 coins.Note: These activities may test code with different test values. This activity will perform two tests: the first with nickels = 5 and dimes = 6, the second with nickels = 9 and dimes = 0.#include <iostream>using namespace std;int main() { int numCoins; int numNickels; int numDimes; numNickels = 5; numDimes = 6;
Create a class called InputData. It has two private data members data_a (int) and data_b (int). Write a function input() to get input for the attributes from the user and a function display() to display the values of the attributes. The values of these two data members can be returned by using two public functions get_a() and get_b().
*Derive a class called Arith_Unit from InputData. It contains the functions add(), sub(),mul(), div() to perform arithmetic operations on data_a and data_b.
*Derive a class Logic_Unit from InputData. It contains the functions and(), or() and xor() to perform bitwise operations on data_a and data_b.
Write a main() to test functionalities of the Arith_unit and Logic_unit classes.
Create a class called DISTANCE with data members as feet (int) and inches (float), use parameterised constructor to get the input values of the data members. Write a function to display the output. Create another class called DIST_KM with a data member kilometre (float). Use a parameterized constructor to assign input and a function to display it. In the main function, write a menu-driven program with 1. Convert feet and inches into kilometres 2.Check whether both the distances are equal or not. For option 1, write the conversion function in the source class. For option 2, create a separate object to assign the kilometres and check the equality of distances by overloading the operator (==). [Note: 1 feet=0.00305km]