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

You are required to create a programming to display the pricing, discounted value, who is the seller and postage company. 

Please include the necessary library before typing your codes. 

Item: shoe, smartphone, Tv, Table fan

Brand: adidas, apple, Samsung, Media

Model: Super-star, 12, S50LED, M17T

Price (RM): 450.99, 4569.99, 1999.99, 555.55

Discount (%): 25.75, 10.75, 20.25, 15.25

Seller: DEF Sdn Bhd, Enjit2 Semut Enterprise, Ah Huat sdn bhd, Jalin enterprise

Postage: Lazada pos, GRAB, City Link, Postlaju.

The output from the codes must have the command COUT for every item. 

Construct the necessary script to solve the given problem. 

 


1.      Using the looping statement. Create a program that will display the following:

 

 

 

A.    5

10

15

20

25

30

 

 

B.     100 90 80 70 60 50 40 30 20 10

 

 

Q1. Define a class Deposit that has a principal, a rate of interest, which is fixed for all


deposits and a period in terms of years. Write member functions to


(i) alter(float) which can change the rate of interest.


(ii) interest() which computes the interest and returns it.


(iii) print() which prints data as shown below. Note that the width of each column is 20.


5mks


Q2. Assume that the cell users are two kinds – those with a postpaid option and those


with a prepaid option. Postpaid gives a fixed free talk time and the rest is computed at


the rate of N2.90 per pulse. Prepaid cards have a fixed talk time.


Define a class Cell_user as a base class and derive the hierarchy of classes. Define


member functions and override them wherever necessary to


(i) retrieve the talk time left for each user.


(ii) print the bill in a proper format containing all the information for the postpaid user.



15. The nodes in a binary tree in preorder and inorder sequences are as follows: preorder: ABCDEFGHIJKLM inorder: CEDFBAHJIKGML


Write a program to search the array element. Enter a value from the keyboard and find out the location of the entered value in the array. If the entered number is not found in the array display the message


What is the output of the following C++ code?

x = 100;

y = 200;

if (x > 100 && y <= 200)

cout << x << " " << y << " " << x + y << endl;

else

cout << x << " " << y << " " << 2 * x - y << endl;


Suppose that str1, str2, and str3 are string variables, and str1 = "English", str2 = 

"Computer Science", and str3 = "Programming". Evaluate the following expressions.

a. str1 >= str2

b. str1 != "english"

c. str3 < str2

d. str2 >= "Chemistry"


Using the looping statement. Create a program that will display the following:

  1. -------------------- *
  2. ------------------- ***
  3. ------------------ ****
  4. ------------------ ****
  5. ------------------- ***
  6. ---------------------*

Create a C++ program that inputs 2 numbers and prints them out. Then print the next 10 numbers in the sequence, where the next number is the sum of the previous two.


Sample Output:


Enter the first number: 1

Enter the second number: 3

1 3 4 7 11 18 29 47 76 123 199 322


define a class license that has a driving number ,name and address.define constructors that take on parameter that is just the number and another where all parameters are present.


LATEST TUTORIALS
APPROVED BY CLIENTS