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

Write a program to implement binary search on 5 elements.


Make a simple calculator using switch statement. Use 4 mathematical operations in


mathematics.


a. When you type A in the console, it will add two numbers


1


st number: 198


2


nd number: 196


b. When you type S, it will subtract two numbers.


1


st number: 145


2


nd number: 67


c. When you type D, it will divide two numbers.


1


st number: 256


2


nd number: 8


d. When you type M, it will multiply two numbers.


1


st number: 125


2


nd number: 5

Make a simple calculator using switch statement. Use 4 mathematical operations in

mathematics.

a. When you type A in the console, it will add two numbers

1

st number: 198

2

nd number: 196

b. When you type S, it will subtract two numbers.

1

st number: 145

2

nd number: 67

c. When you type D, it will divide two numbers.

1

st number: 256

2

nd number: 8

d. When you type M, it will multiply two numbers.

1

st number: 125

2

nd number: 5


Write a function CalculateVal that takes two integer parameters and returns the first parameter minus twice the second parameter. 

Ex: CalculateVal(4, 6) returns -8.


You’ve been asked to write a small menu driven inventory management system for a small convenient

store. Your application shall maintain the following information regarding an item.

Item ID – unsigned long

Item name – string

Item cost – float

Quantity - int

Following are the list of administrative functionalities your application shall support:

1.Add new item to the inventory. This function will be used to add a single new item into the inventory management system.

2.Print all item information in the store - This function will be used to display all items in the inventory. When this option is selected system shall print Item ID, Item name, Item cost and quantity.

3.Find item by ID – This function will be used to search item using an ID. If item exist print item information. If not display an error indicating item not found.


Here is a sample menu.

Inventory Management System Menu

1.Add new item

2.Print item list

3.Find item by ID

4.Find item by name

5.Sort by name

6.Quit







Write a C++ program that takes elements in an array from user. You have to make a function named positive(int) and find total count of positive numbers in an array.


Create C++ full program that calculates a factorial (!) of any number between 3 and 9; the

program should give feedback to the user if the number is less than 3(error number is less than 3), the program should also give feedback if number is greater than 9; you can use either the case or else statement also while loop if applicable


Create C++ full program that calculates area of a rectangle and triangle


You can write any program based on the title assigned.

Title: Sports Activity


The program must fulfil ALL the requirements below. The requirements listed below are the

MINIMUM requirement.


a) Create at least one (1) base class.

b) Create at least two (2) derived classes that inherit from the base class created in 2(a).

c) Create at least one (1) object for each class and one (1) array of objects for one of the classes.

d) Create at least one (1) default constructor for all the classes.

f) Apply dynamic memory allocation using keyword new and delete for any object or array

of objects.

g) Create at least one (1) virtual function.

h) Write sufficient comments to explain your program.


Create C++ full program that calculates the value of u. u=a+gv2

Hint: g must be constant



LATEST TUTORIALS
APPROVED BY CLIENTS