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

Write a program to initialize the data members through passing two parameters using a

constructor. Calculate their sum and print the output on the screen using a separate member

function of a class.


C programming , Let A and B be the two matrix. The size of matrix A is m and size of matrix B. Then, find subtraction of C, is a A and B is defined as C(ij) = A(ij) - B(ij).


Write a program to initialize the data members through passing two parameters using a

constructor. Calculate their sum and print the output on the screen using a separate member

function of a class.


You are given a square matrix A of dimensions NxN. You need to apply the below given 3 operations on the matrix A.


Rotation: It is represented as R S where S is an integer in {90, 180, 270, 360, 450, ...} which denotes the number of degrees to rotate. You need to rotate the matrix A by angle S in the clockwise direction. The angle of rotation(S) will always be in multiples of 90 degrees.


Update: It is represented as U X Y Z. In initial matrix A (as given in input), you need to update the element at row index X and column index Y with value Z.

After the update, all the previous rotation operations have to be applied to the updated initial matrix.


Querying: It is represented as Q K L. You need to print the value at row index K and column index L of the matrix A.

Input





The system shall allow the technician to perform the following operations until the option 5 (exit system) is selected: 1) Add a new order 2) Retrieve an order 3) Deliver an order 4) Print summary report 5) Exit system

Add a new order

The user will add a new cake order request into the system. The system shall store the following cake information into a binary heap. The bakery shop will always prepare an order with nearest delivery date/time. 1. Order ID: Auto generated unique ID to each new job created. 2. Expected delivery Date and time: Delivery date and time 3. Name of the cake: Name based on the flavour of the cake. For example, cheese cake, black forest and etc. 4. Weight: Weight of the cake (0.5kg, 1kg, 2kg) 5. Price: Price of the cake. 6. Status: Status of the order, shall set to “new” when a new order is created.

Note: No built-in classes of the data structure (heap, queue and stack) are allowed. 


Given polynomial, write a program that prints polynomial in Cix^Pi + Ci-1x^Pi-1 + .... + C1x + C0 format.


Write a class named Pet,which should have the following data attributes:

a.__name(for the name of a pet)

__animal_type(for the type of animal that a pet is.Example values are ‘Dog’,

‘Cat’,and ‘Bird’)

__age(for the pet’s age)

The Pet class should have an__init__method that creates these attributes.

It should also have the following methods:

b.set_name:This method assigns a value to the__name field.

set_animal_type:This method assigns a value to the__animal_type field.

set_age:This method assigns a value to the__age field.

get_name:This method returns the value ofthe__name field.

get_animal_type:This method returns the value of the__animal_type field.

get_age:This method returns the value of the__age field.


3.Write an Employee class that keeps data attributes for the following pieces of

information:

a.Employee name

b.Employee number

Next,write a class named ProductionWorker that is a subclass of the Employee class.

The Production Worker class should keep data attributes for the following information:

c.Shiftnumber(an integer,such as 1 for morning shift,2 for evening shift)

d.Hourly payrate

Write the appropriate accessor and mutator methods for each class.


Write a program to create a menu-driven calculator that performs basic arithmetic operations (+, -, *, /, and %).


Write a C++ function that evaluates polynomials an a n x n + a n-1 x n-1 , … , a 2 x 2 ,a 1 x 1 , a 0

x 0 . It should take following inputs:

Value of x.

Highest power n.

Coefficients in descending order a n , a n-1 , … , a 2 , a 1 , a 0 (coefficients will ne

n+1)

For instance, if x=4 , n=3 & coefficients are [2,3,1,2], then output should be 182 which is

obtained by evaluating the polynomial 2 * 4 3 + 3 * 4 2 + 1 * 4 1 + 2 * 4 0

Function Prototype: double evaluatePolynomial();


LATEST TUTORIALS
APPROVED BY CLIENTS