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

A parameterized constructor taking 4 arguments for bread slices, cheese slices, meat patty number and tomato slices. The values of the rest of the variables will be initialized by default to true 2. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 3. Another parameterized constructor that takes argument for each of these variables and initializes them accordingly 4. Provide setters for mustard, ketchup, iceberg and gilled 5. Provide getters for each of these variables 6. Provide a method calculatePrice() that calculates and returns the price of this sandwich according to the rates given in the above table. E.g. the price of a sandwich with 3 bread slices, 2 cheese slices, 2 tomato slices, 3 patties, mustard, no ketchup, no ice berg with grilling will be calculated as 3 * 20 + 2 * 30 + 2 * 5 + 3 * 70 + 5+ 0 + 0 + 10  


Using a for loop, write a programme that prints all values between 20 and 24. Then using an if-else statement and the modulus operator, modify your program to add the word "odd" or "even" to each value to show if it is odd or even.


Expected Output:


20-even


21-odd


22-even


23-odd


24-even


Convert the following FOR statement to WHILE statement: (5 MARKS)



#include <iostream>



using namespace std; #include <iostream>



using namespace std;



int main()



{



for (int counter = 1; counter <= 10; counter++)



cout << “Counter is: ” << counter << endl;



return 0;



}

Design an online address book to keep track of the names, addresses, and phone numbers.

1) Define class, address Type that can store a street address, city, state, and zip code.

2) Define a Class, person Type that can store an addressType object, name and phone number.

3) Make a list using personType data.

4) Provide a user with following options

i. Add a new person data in dictionary.

ii. Delete a person on the basis of name.

iii. Delete a person on the basis of phone number.

iv. Search a person on the basis of name.

v. Print a complete address book.

vi. Program terminates when user press -100.


Suppose m and r are integers. Write two different ways of C++ expression for mr2,store the result to variable result. The other expression uses the math function for r2 and the other doesn’t use the math



function but the equivalent expression

Write a program that prompts the user to input height and width and print the hollow rectangle

as given in the output below. The program should check whether the both height and width

of rectangle are equal or not. Do not use nested loops.


this problem, you are required to build a system that can generate a random winning


scenario for the T20 cricket world cup. There are 12 teams in the tournament and every team will play


one match each on the knock-out basis in the first round. It means that the losing team of every match


leaves the tournament while the winning team continues to play the next match. From the twelve teams,


six winning teams will play another knock-out match. From these six teams, three winning teams will play


against each other on the round robin basis (i.e. team A plays against team B, team B plays against team


C, and team C plays against team A). The top two teams from this round will move to the final match. In


case all the teams win one match each at this stage, then there will be a toss to move one team to the


final while the other two teams will play against each other and the winner moves to the final. The winner


of the final match will be declared the champion of the T20 world cup.

c++ programming Write a program which reads salaries of 10 employes of an organization. The program will, what the maximum salary is and what the minimum salary is

Demonstrate what are the other area where  copy constructor is called using C++ programme.





Demonstrate how copy constructor is called during pass by value and return by value using C++ programme.


LATEST TUTORIALS
APPROVED BY CLIENTS