Take user input and insert the data at the respective position in the sorted 1) stack 2) queue and 3) linked list.(using arrays)
Cake Ordering System
1) Add a new order
Let user add a new cake order into the system.
System will store the following cake information into a binary heap.
Cake information contain:
a) Order ID (auto-generated)
b) Expected delivery data and time
c) Name of the cake (e.g., butter cake, biscuit cake and etc.
d) Weight (in kg)
e) Price
f) Status (set to “new” when a new order is created)
2) Retrieve an order
System shall retrieve and remove the order (with the nearest delivery data and time) from the binary heap data structure and update the status as “in progress” and move the order into a queue data structure.
consider two classes to store the names of people.class NAME will store the name in upper case and class name will store in lower case. write a program to convert the uppercase name to a lowercase name using the both at source and destination method
write a program and input two integers in main and pass them to default constructor of the class show the result of the addition of two numbers
Task 1
Solve this problem using stacks, Implementation other than stack will leads to zero
marks
Write a class ex_conversion in C++ to evaluate postfix expressions. You will have to
implement following methods.
1. InputEx – will let the user enter the postfix expression in character array to
be evaluated.
Enter the expression: abc*+d-
2. ReadVar – will read the values of variables a,b,c,d . . . z from file (“data.txt”)
and return true on successful read.
10 20 30 40 50 60 . . . 26
3. EvaluateEx – will evaluate the expression and return the answer or display
the error message.
Sort the data stored in 1) stack 2) queue and 3) linked list entered in part 1 (using arrays)
In this assignment is to simulate an ATM machine. Program should able to do the following
operations:
A. Create accounts for the users. A user account is created using User ID and
Password. Every user has unique User ID and Password.
B. A user should able to login using his User ID and Password.
C. A user can quit the program.
D. Provision to Delete a User
Initially there are no users. There program should prompt for the following option:
1) New Account,
2) Login,
3) Quit and
4) Delete an Account
Depending upon the option selected necessary action to be taken. New Account option adds a
user account. When a user is added then the total number of users is increased by one. For
successful Login option user will be able to do the following:
a) Withdraw money,
b) Deposit money, and
c) Request balance,
Given an array of integers, find the one that appears an odd number of times.
There will always be only one integer that appears an odd number of times.
ATM machine. Program should able to do the gvn operations:
A.users can Creat acc using UserID and Password with unique data entry everytime.
B.user must able to login using UserID and Password.
C.user can quit the program.
D.Provision to Delete a User
Initially zero users.on selecting opt.New Account opt adds a user account. When a user is added then the total number of users is increased by 1. For successful Login opt user will be able to do:a)Withdraw money, b)Deposit money,(c)Request balance,For unsuccessful Login,the program displays “Login error,try again" and prompts the initial four opts.When a Dlt an Acc opt is selected,the program prompts for: User ID,Password to be dletd.On dletng a user the no. of users is reduced by 1.Quit opt terminates the program.The program to run infinitely until a user quits the program.The program able to display when requested for:(i)No.of users and Total deposit,(ii)Deposit for Gvn User ID,(iii)Transaction Detls for a Gvn User ID,wap using class,function
class baseClass
{
public:
void print();
int getX();
baseClass(int a = 0);
protected:
int x;
};
class derivedClass: public baseClass
{
public:
void print();
int getResult();
derivedClass(int a = 0, int b = 0);
private:
int y;
};
void baseClass::print()
{
cout<<"In base: x= "<< x <<endl;
}
baseClass::baseClass(int a)
{
x = a;
}
int baseClass::getX()
{
return x;
}
void derivedClass::print()
{
cout<<"In derived: x= "<< x <<", y= "<< y
<<"; x + y = "<< x + y <<endl;
}
int derivedClass::getResult()
{
return x + y;
}
derivedClass::derivedClass(int a, int b): baseClass(a)
{
y = b;
}What is the output of the following function main?
int main()
{
baseClass baseObject(7);
derivedClass derivedObject(3, 8);
baseObject.print();
derivedObject.print();
cout<<"****"<<baseObject.getX()<<endl;
cout<<"####"<<derivedObject.getResult()<<endl;
return 0;
}