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

1.      Create a function that would help you compute the average expense of car fueling in a month. It would take as an input number of times in a month that you have refueled. Create a dynamic array of the given size. Then you would be required to input that may times the amount used to refuel and store values in this dynamic array. Now compute the .using in c++.

a.      average of these cost

b.      most expensive refueling

c.      Least expensive refueling.

2.      Overload the function from 1 to read the number of entries in a file. Create a dynamic array of the given size. Then you would be required to input that may times the amount used to refuel and store values in this dynamic array. Now compute the

a.      average of these cost

b.      most expensive refueling

c.      Least expensive refueling.

3.      Write back results from 1 in the file “manual_input.txt”

4.      Write back results from 2 in the file “automated_input.txt”




write a program which loads (from keyboard)variables of four basic types

1.integer number(preferably short)


You are required to build a system that can generate a random winning scenario for the T20 cricket world cup. There12 teams which will play knock-out matches in the first round. losing team is out and the winning team moves on. 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 is champion. generate random numbers for matches and toss You are required to use if-else (if-else-if) structure to run the tournament and generate one complete winning scenario randomly.


You are required to build a class to represent the a cup of coffee. Call your class CoffeeCup. A coffee cup will have following characteristics 1. type (sting) // can be mocha, cupaccino, etc 2. temperature (float): represents the measure of temperature in degrees 3. volume (float):// the volume of coffee in the cup in ml liters 4. sugar (int):// no of teaspoons of sugar added to the coffee Provide these methods 1. parameterized constructor CoffeeCup(string t, float temp float vol, int sug) 2. Provide setters for temperature, and sugar and volume. 3. Provide getters of temperature, sugar, volume and type. 4. void heatUp(): //this method represents the process of heating the coffee, the current temperature of coffee goes up by one degree if it is below 100 and stays the same otherwise 5. void cooldown(): the process of cooling down. The temperature goes down by one degree but will not go below 0 6.


class in c++

parameterized constructor CoffeeCup(string t, float temp float vol, int sug) 

1.void heatUp(): //this method represents the process of heating the coffee, the current 

temperature of coffee goes up by one degree if it is below 100 and stays the same otherwise 

2.void cooldown(): the process of cooling down. The temperature goes down by one degree but 

will not go below 0 

3.bool isSweet():// returns true if this coffee has any amount of sugar in it and 0 if not at all 

4.bool hasMore(): //this method checks if the cup has coffee in it that a person can take a sip 

from. For the implementation assume that one sip consumes a volume of 0.3 ml. 

5.bool isEmpty(): // returns true if a person can take a sip from this cup and false otherwise 

6.bool takeASip():// this method represents the actual act of sipping.


Write a program the declares and initalises the variable myNum to the value 20.


Miss question was the ofference bene and


Now using a while loop decrease the value of myNum by 0.5 and continue to print its value as long as it remains positive (e.g. above zero).


Write a value-returning method, isVowel, that returns the value true if a given character is a vowel, and otherwise returns false. Also write a program to test your method.


The electoral petition of 2021 was aimed at determining the winner of the 2020 election. The rule is that the winner of an election in Ghana must obtain at least 50% +1 of the valid votes cast. a. Explain the concept of function in C++

b. Declare a function called Greatest, your function should have five arguments 3 i. The two names of the presidential candidates with the most votes ii. Total number of votes for each of them. iii. Total valid votes cast.

c. Your function should declare that candidate that had at least 50%+1 of the valid votes cast as winner.

d. Explain the logic behind the code


It is being debated that these imported cars contribute immensely to the high road accident cases in Ghana. The government has decided to charge 0.5 % tax on every car purchased from KTA. This will increase sales of KTA cars and arguably reduce road accidents in Ghana You are to write a program. Your program should: a. Request for a username and password to be inputted. Your username and password should grant access to the program if they are correctly inputted. (ANS) b. Your program should have a function that calculates and displays the tax on any car (ANS) purchased. c. Your program should be able to perform "b" above at least 10 times. (ANS) d. Assuming sales have now gone up and the government has scraped the tax incentive. tax of 25% imposed on each car sale. Modify a portion of the code to reflect the new development (ANS) e. Explain how the Ghana Revenue Agency (GRA) can use your program to calculate tax on goods imported into the country.


write a program to find the smallest value in a vector that is larger than the smallest vaue presented. for example 1 ,2 , -7 . -6 . 3 smallest = -5 . another example -45 , -1000 , -1 , -2 , smallest is -999


LATEST TUTORIALS
APPROVED BY CLIENTS