Wap to create One Base class Father data member fname. And Son class derived from Father dada member sname . And GrandSon derived from Son data member gname. Use appropriate function that GrandSon will display all name by it concatenating
Given X="ABCDEFGHIJKLMNOPQRSTUVWXYZ", X[8:16:2] is?
a) IKMO
b) IKMOQ
c) HJLNP
d) Error
This problem is related to the virtual learning environment application discussed in one theory session and a few practicals. In this problem, you are tasked with creating and updating learner profiles, a particular type of user. As well, given a learner profile, we would like to retrieve the learning materials in the form of topics. Note that the learning materials for a given course will differ from one learner profile to another. For example, for a course "Distributed Systems and Applications", the learning materials for a learner with a weak background in "Programming" compared o another learner profile with a stronger background in programming.
Your task is to:
1. Provide a description in OpenAPI of the API that allows for communication between a client and a service for the functionalities discussed above;
2. Implement a corresponding client and a service.
Wap to create Hierarchical Structure. Number class is base data member int X and two derived class Perfect & Strong. It will check corresponding whether no is perfect or Strong. But thing is one input will taken and that single input will check both.
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.
Draw a flowchart that calculates and prints the bill for a cellular telephone company. The company offers two types of service: regular and premium. Rates vary based on the type of service and are computed as follows:
Regular service: $10.00 plus first 50 minutes are free. Charges for over 50 minutes are $0.20 per minute.
Premium service: $25.00 plus:
a. For calls made from 6:00 a.m. to 6:00 p.m., the first 75 minutes are free; charges for over 75 minutes are $0.10 per minute.
b. For calls made from 6:00 p.m. to 6:00 a.m., the first 100 minutes are free; charges for over 100 minutes are $0.05 per minute.
Given; Shopping ui ,Product class ,Size class ,Region class
You will create Cart class as a context class to get total price and add product.
To implement Strategy pattern, depending on the country of shipping, the relevant customs duty is charged and the shipping cost of Europe Shopping, America Shopping increases. Large products (XL-size) have an additional charge. Create AmericaShopping and EuropeShopping concrete class. In the USA, the duty tax is 1% and the base delivery fee is $15. In America, an additional tax different from the customs tax is applied and this tax is 0.75. Customs duty should be added to the item fee for each item. In Europe, the customs duty is 1.5% and the base delivery fee is £11. In America, $5 should be added to the shipping fee when each item is added. But if the added product size is XL, $10 should be added to the shipping fee. In Europe, this should only be done if the product size is XL. You are NOT allowed to alter Shopping, Product, Size, Region, and Currency classes.
Write a program that takes an integer minutes and converts it to seconds.
Program call National lottery dat give the winning lottery numbers. The program must use the rand function to produce six(6) random numbers between 0 & 49 & number must not repeat. Search the winning_numbers for any 2 array elements dat give the sum of >= 80 when added together, if the numbers >= 80 are more than 1 set, consider the biggest set to be the 1 chosen for draw. If the value of the sum of the 2 values is >= 80, print the message “You have won” & if the sum of the 2 numbers is < 80, print the message “You did not win”. a custom made function called amountDeterminant(double & receives a double argument), argument will be the winning number from the sum of 2 numbers. amountDeterminant. Winning numbers are in between 80 and 83, the won amount is R17M 84 & 86, amount is R2.5M, 87 & 89, amount is R16M
-use switch condition, appropriate pointer print "address the number" & for statement or initialiser list to the numbers into arrays