C++ Answers

Questions answered by Experts: 9 913

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

Task C: Substitution and Hamming Distance

For this task, we will explore mutations that occur by substitution. Your task is to write a program called hamming.cpp that calculates the Hamming distance between two strings. Given two strings of equal length, the Hamming distance is the number of positions at which the two strings differ. e. g.: Hamming("aactgc", "atcaga") would output 3. Notice that certain amino acids are encoded by multiple codons. Therefore, not all substitutions result in a change of protein structure. The file <code class="language-plaintext highlighter-rouge" style="font-family: monospace, monospace; font-size: 1em; padding-left: 0.5em; padding-right: 0.5em; border-style: solid; border-width: 1px; border-radius: 0.5em; border-color: rgb(248, 248, 248); background: rgb(248, 248,


Using C++ Program develop any application that reads marks obtained by a student in a test of 100. Marks and computes his grade according to the following criteria.
Marks>=80 grade=A
Marks>=70 & <80 grade=B
Marks>=60 & <70 grade=C
Marks>=50 & <60 grade=D
otherwise grade=F

A point on a two-dimensional space has two numbers: an ‘X’ coordinate and a ‘Y’

coordinate such as (4, 5). Write a program that uses a structure called ‘point’ to model a

point and draw a rectangle of ‘*’ based on the entered height and width of the rectangle.

Sample Run:

Enter the point coordinates: (x, y)

3 2

Enter width of the rectangle: 3

Enter Height of the rectangle: 2

* * *

* * *


Generate the driver file (main.cpp) where you perform the following tasks. Note that you cannot make any change to

the header file or the source file.

Operation to Be Tested and Description of Action Input Values Expected Output

Create a list of integers Print length of the list


You are requested by a SuperStore (Spar) in Soshanguve to calculate it’s earning for the week (the store opens the entire week) and determine the day with the highest and lowest earnings. The Store comprises of two sections namely the Food section and the Liquor store. Your C++ program should prompt the total sales for each section for each day and store the total sales for the day into an array. At the end of the week It should display a report for Management for the total sales for that week, the day the lowest sales and the day with the highest sales were recorded.



- Write a return-value function named calcCharges() to calculate and return the parking charges for the customers. The company charges a RM1.00 minimum fee to park for up to one hour. An additional RM0.50 will be charged for each hour exceeding the first one hour. The maximum charge for any given 24-hour period is RM10.00. Assume that no car parks for longer than 24 hours at a time.

- Write a void function named calcTotal() to calculate the total charges for all the customers.

- Write the main program that allows the user to input number of customers and the hours parked for the customers. The program should use the function calcCharges()above to calculate the parking charges for each customer and function calcTotal() above to calculate the total charges for all the customers.

- Finally, your program should output the parking charges for each customer and the total charges for all the customers. Use the appropriate parameters to pass values in and out of functions.


Write a complete C++ program that uses a while loop to perform the following:  Input scores for CSC126 exam for the students enrolled in CSC126 course. User has to input number of students.  Find and display the total of the scores.  Find and display the highest and lowest scores.  Calculate and display the average of the scores.  Count and display how many students earned scores above and equal to 50 marks.  Count and display how many students earned scores below 50 marks. 


You are requested by a SuperStore (Spar) in Soshanguve to calculate it’s earning for the week (the

store opens the entire week) and determine the day with the highest and lowest earnings. The

Store comprises of two sections namely the Food section and the Liquor store.

Your C++ program should prompt the total sales for each section for each day and store the

total sales for the day into an array. At the end of the week It should display a report for

Management for the total sales for that week, the day the lowest sales and the day with the

highest sales were recorded. Refer to below screen shot for sample Input and Output.


You are requested by a SuperStore (Spar) in Soshanguve to calculate it’s earning for the week (the store opens the entire week) and determine the day with the highest and lowest earnings. The Store comprises of two sections namely the Food section and the Liquor store. Your C++ program should prompt the total sales for each section for each day and store the total sales for the day into an array. At the end of the week It should display a report for Management for the total sales for that week, the day the lowest sales and the day with the highest sales were recorded. Refer to below screen shot for sample Input and Output

You are requested by a SuperStore (Spar) in Soshanguve to calculate it’s earning for the week (the

store opens the entire week) and determine the day with the highest and lowest earnings. The

Store comprises of two sections namely the Food section and the Liquor store.

Your C++ program should prompt the total sales for each section for each day and store the

total sales for the day into an array. At the end of the week It should display a report for

Management for the total sales for that week, the day the lowest sales and the day with the

highest sales were recorded.


LATEST TUTORIALS
APPROVED BY CLIENTS