Reference no: EM13936861
1 Create three arrays of 20 integers each. Fill in two arrays with data, leaving the third blank. From main, pass these three arrays into a function. Inside the function, add the value of each array element and store it in the third.
third_array[i] = second_array[i] + first_array[i]
Back in main, print out the value of every element in the third/sum array. Excellent output on this assignment might show something like:
Array 1 + Array 2 = Array 3
5 + 3 = 8
10 + 4 = 14
etc.
2. Design and run a program that takes a numerical score and outputs a letter grade. Specific numerical scores and letter grades are listed below:
90-100 = Grade A
80-89 = Grade B
70-79 = Grade C
60-69 = Grade D
0-59 = Grade F
In this program, create two void functions titled getScore and printGrade with an int argument. The function getScore should have a Reference parameter and printGrade should have a Value parameter.
The function getScore will prompt the user for the numerical score, get the input from the user, and print the numerical score. The function printGrade will calculate the course grade and print the course grade. (Be careful and note that the assignment requires you to input the grade into getScore and not directly into the main function.)
Do not forget to put in the proper prompts and appropriate output messages. (Note: This program is a natural for use of the switch command, but if?else structures will also work.)
3. Write a program that includes the following four steps:
Step 1.Create a structure with the name StudentRecord containing a Name stored as an array of 20 characters, an ID stored as an integer, and a GPA stored as a floating-point number. Create (instantiate) a variable from StudentRecord called TESCStudent.
Step 2. Assign the following values to the variable by assuming Name is SuperProgrammer, with an ID of 1234, and a GPA of 4.0.
Step 3. The program should print out on the screen that SuperProgrammer with an Identification number of 1234 has a 4.0 GPA. (Of course, your program needs to use the structure you defined in step 1.)
Step 4. Generalize the program so that you can input the student's name, ID, and GPA when the program is run. Please do not forget to include prompt statements in your program. Print out the user entered Name, ID, and GPA.
Make sure your program includes all four steps, not just steps 1 and 4.
4. Define a class called Plot that has private members of length and width. Include a constructor and a public function that calculates the area and the length of the boundary of the field. Use public functions in a program that computes and displays the area and the length of the boundary of the plot where the length and width are 7 and 9 respectively. Hint: The length of the boundary is 2 * (length + width).
Memory segment in terms of its start address
: The above segment descriptor describes a memory segment in terms of its start address, its size and whether it is ALLOCATED or FREE. This descriptor is part of a list (contains a pointer to next segment descriptor). Initially, there is only one se..
|
Calculate keep-kools total ordering and carrying costs
: Calculate Keep-Kool's total ordering and carrying costs using EOQ. Assume that demand is uniform throughout the year and is known with certainty.
|
Concepts of sct to an environmental health behavior
: For this Discussion, you apply the concepts of SCT to an environmental health behavior. You may choose one of these examples or your own topic: recycling; responsible energy use (e.g., compact fluorescent [CFL]/light-emitting diode [LED] lightbulb..
|
Briefly described the product purchased
: 1) Briefly described the product purchased. For example, what was the model, any special features, exact cost, etc.
|
Design and run a program that takes a numerical score
: In this program, create two void functions titled getScore and printGrade with an int argument. The function getScore should have a Reference parameter and printGrade should have a Value parameter.
|
Managerial decision making research and analysis
: Research a specific company of your choice and identify some of the managerial decisions that were made over time and in response to changes in its market or competitive environment. Use the Ashford University Library and web-based sources for your r..
|
Attribute confers a bonus or penalty
: Each class should weight each attribute from most to least important. In Method IX, the most important attribute rolls 9d6 and keeps the highest 3. The second most important rolls 8d6, keeping the highest 3. This follows in this pattern of 7d6, th..
|
Calculate changes costs if he purchases paper from papyrus
: Calculate changes costs if he purchases paper from (a) Papyrus and (b) Suffolk Leaves. Which supplier should Manraj choose only on the basis of the financial numbers given in the problem?
|
Program to modify double linked list
: Modify Double Linked List code to include following index based access operations.
|