Questions: 11 448

Answers by our Experts: 10 707

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Declare a class called logic_gate to represent logic gates. The class has three data

members - input1, input2 and input3 to represent three inputs to the logic gate. The

class also has a virtual function member called get_gate_output. Derive two

classes from the base class logic_gate, namely, and_gate and or_gate to represent

‘logical and gate’ and ‘logical or gate’ respectively. Define function

get_gate_output in both of these classes to get the output of the gate. Show use of

above classes and functions to demonstrate dynamic polymorphism in function

main


Attaching a link below which contain question for C++ kindly answer this as soon as possible shall be thankful.


https://drive.google.com/file/d/1ag_lt9tUtEiDE910HhaNaDHpT89eWM6L/view?usp=sharing

Write a C++ program to find the owner name of the hall by hall number using the map.

 

In the main method, obtain input as CSV from the user in the console and find the Hall number to get the Owner of that hall using the map. 

 

Problem constraints:

Create a Map as  map <string, string >

Use find()  to find the hall owner’s name.


Input and Output Format:

The First line of input consists of an Integer 'n' which corresponds to the number of Halls.

The next 'n' lines of Inputs are in CSV format.

For output refer to sample Input and Output for formatting specifications.

 

Sample Input and Output 1:

Enter the number of Halls

4

Enter details of Hall 1:

Hall-230, Binny

Enter details of Hall 2:

Hall-233, Ram

Enter details of Hall 3:

Hall-255, Annie

Enter details of Hall 4:

Hall-240, Vikram

Enter the Hall number to find its owner:

Hall-233

The owner of Hall-233 is Ram


Write the C++ program that will compute for the area under the curve of the equation,

Input:

- The lower limit a.

- The upper limit b.

- The number of trapezoids.

Compute for the area using trapezoids:

- Declare an array whose size will be equal to the number of trapezoids.

- Use a looping structure.

- Pass arguments to a module that will compute for the area of the trapezoid and return the area back to the calling method.

- Each element in the array will be assigned the returned area for every trapezoid.

- Use an accumulator to compound the sum of each element in the array. 

Compute for the area using integral:

- Pass arguments to a module that will compute for the area under the curve and return the area back to the calling method.

- Assign the returned area to a variable.

Output:

- The area of each trapezoid.

- The area using the trapezoid method.

- The area using integral calculus.

- Percentage error (absolute).


A vegetable shop owner maintains the data in linked list. Write a menu-driven program that maintains

a singly linked list. Each vegetables node must contain the features: unique id, date of inclusion in

stock, vegetable name, shape, raw eating/cooking feature, weight, price per kilogram. Execute all the

following operations and attach screenshots of outputs along with other data/code as written (code

screenshot will not be allowed) in instructions in the submission pdf file.

1. Inclusion of 2 different type of vegetables.

2. Display data of all vegetables in stock nodes.

3. Delete a node based on some ’key’ searching criteria such as stock inclusion date is 10 days ago

or if a customer buys a vegetable and weight of that vegetable in stock has reached to zero.

4. Inclusion of two new vegetables (same or different).

5. Display data of all vegetables in stock.


FREE THE TICKETS

Henry is working at a ticket counter. He has to store the ticket numbers continuously so he asks for help to free the stored ticket numbers so that he can store the ticket number again.


Strictly adhere to the Object-Oriented specifications given in the problem statement. All class names, member variable names, and function names should be the same as specified in the problem statement.

Write a program to read the ticket numbers from the user and display the number after free the memory also.

 

In the main method, obtain input from the user in the console and display the ticket details.

Note:

Use free to deallocates a block of memory.


Input format:

Input consists of the number of tickets and the ticket numbers.


Output format:


Enter the number of tickets

3

Enter the ticket numbers

21

23

25

Ticket numbers are

21 23 25 

After free, the ticket numbers are

0 0 25 


Your task


1) void PrinList(),

2)int search_Element(int X),3)

void Insert_Element(int X),

4)void

Insert_Element_at(int X, int pos),

5) bool Delete_Element(int X),

6) bool is_Empty(),

7)int Length(),

8) void Print_Reverse_List(),

9) void Empty_List(),

10) void Copy_List(…)


Note:

1)Perform the above tasks for linked list

2)make copy, default and parameterized constructors

3)make a menu in main and call the functions through the manu

4)No global declarations


Write a C++ program that calculates the due amount for a cellular telephone bill. The cell company offers the following two types of services:

  • LOW: $0.2 per day minute for the first 100 minutes, plus $0.5 per each extra day minute. And all-night minutes are free.
  • HIGH: $0.1 for the first 200 day minutes, plus $0.2 per each extra day minute. The charge is free for the first 200 night minutes, plus $0.1 per each extra night minute.

The program should ask the user for the type of service (Input the word LOW or HIGH) that he uses and the amount of day minutes and night minutes he consumed and then the program will print the service type (the word LOW or the word HIGH), total number of minutes, and the total amount due.


Write a program to implement bank functionality in the above scenario. Note: Create

few classes namely Customer, Account, RBI (Base Class) and few derived classes (SBI,

ICICI, PNB etc). Assume and implement required member variables and functions in

each class.


Write a program to demonstrate the order of call of constructors and destructors in case of multiple inheritance where one or more base classes are virtual.


LATEST TUTORIALS
APPROVED BY CLIENTS