All Matches
Solution Library
Expert Answer
Textbooks
Search Textbook questions, tutors and Books
Oops, something went wrong!
Change your search query and then try again
Toggle navigation
FREE Trial
S
Books
FREE
Tutors
Study Help
Expert Questions
Accounting
General Management
Mathematics
Finance
Organizational Behaviour
Law
Physics
Operating System
Management Leadership
Sociology
Programming
Marketing
Database
Computer Network
Economics
Textbooks Solutions
Accounting
Managerial Accounting
Management Leadership
Cost Accounting
Statistics
Business Law
Corporate Finance
Finance
Economics
Auditing
Hire a Tutor
AI Study Help
New
Search
Search
Sign In
Register
study help
computer science
systems analysis design
Questions and Answers of
Systems Analysis Design
Write an application that allows the user to input monthly rainfall amounts for one year storing the values in an array. Create a second array that holds the names of the month. Produce a report
Write a program that allows the user to enter any number of names, last name first. Using one of the predefined methods of the Array class, order the names in ascending order. Display the results.
Create three arrays of type double. Do a compile-time initialization and place different values in two of the arrays. Write a program to store the product of the two arrays in the third array.
Write an application that can be used to test input values to ensure they fall within an established range. Use an array to keep a count of the number of times each acceptable value was entered.
Using the above declarations write a for loop to increment each element in bArray by 5.
Using the above declarations write a foreach loop to display the contents of bArray.
If you declare an array as int [ ] anArray = new int[5]; you can double the value stored in anArray [2] with the statement:a. anArray[2] = anArray[5] * 2;b. anArray = anArray * 2;c. anArray[2] *=
With the following declaration:int [ ] points = {550, 700, 900, 800, 100};the statement points[3] = points[3] + 10; willa. replace the 800 amount with 810b. replace the 550 amount with 560c. replace
With the following declaration:int [ ] points = {300, 100, 200, 400, 600};the statement points [4] = points[4 – 2]; willa. replace the 400 amount with 2b. replace the 300 and 600 with 2c. replace
With the following declaration:int [ ] points = {300, 100, 200, 400, 600};the statement Write(points[2] + points[3]); willa. display 200400b. display 600c. display "points[2] + points[3]"d. result in
When you pass a single integer array element to a method, the method receives:a. a copy of the arrayb. the address of the arrayc. a copy of the value in the elementd. the address of the elemente.
When you pass the entire array to a method, the method receives:a. a copy of the arrayb. the address of the arrayc. a copy of the first value in the arrayd. the address of each of the elements in the
A correct method call to a method that has the following heading would be:int result(int [ ] anArray, int num)a. Write(result(anArray, 3));b. result(anArray, 30);c. Write(result(anArray[ ], 3));d.
A valid call to the following method using a params parameter is:public static void DoSomething(params int[ ] item)a. DoSomething(4);b. DoSomething(anArray);c. DoSomething(4, 5, 6);d. a and c are
Using the following declaration:int [ ] anArray = {34, 55, 67, 89, 99};what would be the result of each of the following output statements?a. WriteLine(anArray.Length);b. WriteLine(anArray[2]);c.
The Ion Realty Sales Corporation would like to have an application showing how each monthly sales contributes to their overall total sales.Write a program that accepts as input any number of monthly
Write an application that provides statistics about temperatures for a given week. Your solution should be a two-class application that has a one-dimensional array as a data member. The array stores
Write a two-class application that has as a data member an array that can store state area codes. The class should have a member method that enables users to test an area code to determine if the
Using the following declaration:int [ , ] x = {{12, 13, 14, 15 }, {16, 17, 18, 19 }};what does x[2, 4] refer to?a. 19b. 18c. '\0'd. 0e. none of the above
Which of the following adds 95 to the array element that is currently storing 14?int [ , , ] x = {{12, 13 }, {14, 15 }, {16, 17 }, {18, 19 }};a. x[2] += 95;b. x[1, 0] += 95;c. x[1, 0 += 95];d. x = 14
How many components are allocated by the following statement?double [ , ] values = new double[3, 2];a. 32b. 3c. 5d. 6e. none of the above
Given the declaration for values in question #11 above, how would you store 0 in the last physical location?a. values = 0;b. values[6] = 0;c. values[3, 2] = 0;d. values[2, 1] = 0;e. none of the above
If you declare an array as int [ , ] anArray = new int [5, 3];you can double the value stored in anArray[2, 1] with the statement:a. anArray[2, 1] = anArray[5, 1] * 2;b. anArray = anArray * 2;c.
With the following declaration:int [ , ] points = {{300, 100, 200, 400, 600},{550, 700, 900, 800, 100}};the statement points[1, 3] = points[1, 3] + 10; willa. replace the 300 amount with 310 and 900
With the following declaration:int [ , ] points ={{300, 100, 200, 400, 600},{550, 700, 900, 200, 100}};the statement points[0, 4] = points[0, 4-2]; willa. replace the 400 amount with 2b. replace the
With the following declaration:int [ , ] points = {{300, 100, 200, 400, 600},{550, 700, 900, 200, 100}};the statement Write(points[1, 2] + points[0, 3]); willa. display 900400b. display 1300c.
When you pass an element from an ArrayList to a method, the method receives:a. a copy of the ArrayListb. the address of the ArrayListc. a copy of the value in the element of the ArrayListd. the
A two-dimensional array is a list of data items that ________________a. all have the same type.b. all have different names.c. all are integers.d. all are originally set to null ('\0').e. none of the
Using the following declaration:char [ , ] n = {{'a', 'b', 'c', 'd', 'e'},{'f', 'g', 'h', 'i', 'j'}};what does n[1, 1] refer to?a. ab. fc. bd. ge. none of the above
Write a program that accepts any number of homework scores ranging in value from 0 through 10.Prompt the user for a new score if they enter a value outside of the specified range. Prompt the user for
Write a program that allows any number of values between 0 and 10 to be entered. When the user stops entering values, display a frequency distribution bar chart. Use asterisks to show the number of
Write a program that will produce a report showing the current and maximum enrollments for a number of classes. Your applications should be designed with two classes. The first class should include
When two values are contained within the square brackets, the last number represents the number of:a. classesb. rowsc. planesd. columnse. none of the above
Which of the following array declarations would enable you to store the high and low temperatures for each day of one full week?a. int temp1Lo, temp2Lo, temp3Lo, temp4Lo, temp5Lo, temp6Lo, temp7Lo,
Assume a two-dimensional array called num is declared to hold four rows and seven columns. Which of the following statements correctly assigns the value 100 to the third physical column of each
Choose the statement that does not apply to the following declaration:double [ , ] totalCostOfItems ={{109.95, 169.95, 1.50, 89.95},{27.9, 18.6, 26.8, 98.5}};a. declares a two-dimensional array of
What value is returned by the method named result?a. the row index of the largest element of array anArrayb. the value of the largest element of array anArrayc. the row index of the smallest element
What is the largest dimension an array can be declared to store values?a. 10b. 100c. 3d. 5e. there is no limit
When you pass the entire ArrayList to a method, the method receives:a. a copy of the ArrayListb. the address of the ArrayListc. a copy of the first value in the ArrayListd. the address of each of the
How many components are allocated by the following statement?double [ ] values = new double[3];a. 32b. 3c. 2d. 4e. none of the above
To write a sentinel-controlled loop to compute the average temperature during the month of July in California, the best option for a sentinel value would be:a. 67b. 1000c. 100d. “high
Which of the following represents a pretest loop?a. whileb. do. . .whilec. ford. a and be. a and c
If you intend to place a block of statements within a loop body, you must use ___________ around the block.a. parenthesesb. square bracketsc. quotation marksd. curly bracese. none of the above
How many times is the loop body of the while statement executed?a. onceb. neverc. four timesd. five timese. until a number 5 or larger is entered
The value stored in variable z at the end of the execution of the loop could best be described as:a. the number of positive items enteredb. the sum of all positive items enteredc. the number of
The loop can best be categorized as a:a. counter-controlled loopb. sentinel-controlled loopc. state-controlled loopd. flag-controlled loope. none of the above
How many lines of output will be printed by the following program fragment?for (i = 0; i < 5; i++)for (j = 0; j < 4; j++)WriteLine("{0} {1}", i, j);a. 20b. 6c. 9d. 12e. none of the above
How many lines of output will be printed by the following program fragment?for (i = 0; i < 5; i += 2)for (j = 0; j < 4; j = j + 2)WriteLine("{0}{1}", i, j);a. 20b. 6c. 9d. 12e. none of the above
What would be the result of the following conditional expression?int i = 0;while (i < 10) ;i++;Write(i);a. 123456789b. 012345678910c. 0123456789d. an infinite loope. none of the above
Convert the following do. . .while loop into a for loop and a while loop. Did the logic change? If so, explain.int counter = 100;do{WriteLine(counter);counter--;}while (counter > 0);
What would be the output produced from the following statements?int i = 0;while (i < 0){Write("{0}\t", i);i++;}Write("{0}\t", i);a. 0b. an infinite loopc. an errord. 0 0e. none of the above
To produce the output 2 4 6 8 10 which should be the loop conditional expression to replace the question marks?int n = 0;do{n = n + 2;Write("{0}\t", n);}while (????);a. n < 11b. n < 10c. n < 8d. n >=
Loops are needed in programming languages:a. to facilitate sequential processing of datab. to enable a variable to be analyzed for additional processingc. to allow statements to be repeatedd. to
Which loop structure can only be used with a collection such as an array?a. foreachb. forc. whiled. do. . .whilee. none of the above
If a loop body must be executed at least once, which loop structure would be the best option?a. foreachb. forc. whiled. do. . .whilee. none of the above
If a loop body uses a numeric value that is incremented by three with each iteration through the loop until it reaches 1000, which loop structure would probably be the best option?a. foreachb. forc.
When used with a while statement, which jump statement causes execution to halt inside a loop body and immediately transfers control to the conditional expression?a. breakb. gotoc. returnd.
Which of the following is a valid C# pretest conditional expression that enables a loop to be executed as long as the counter variable is less than 10?a. do while (counter < 10)b. while (counter <
Which of the following for statements would be executed the same number of times as the following while statement?int num = 10;while(num > 0){WriteLine(num);num--;}a. for (num = 1; num < 10; num++)b.
What would be the output produced from the following statements?int aValue = 1;do{aValue++;Write(aValue++);}while (aValue < 3);a. 23b. 234c. 1234d. 2e. none of the above
If aValue, i, and n are type int variables, what does the following program fragment do?aValue = 0; n = 10;for (i = n; i > 0; i--)if (i % 2 == 0)aValue = aValue + i;a. computes the sum of the
Write a for loop to display every third number beginning with 10 and continuing through 100.
Write a sentinel-controlled while loop that allows any number of temperatures to be entered. The average temperature should be calculated and displayed.
Create a loop body that generates random numbers between 25 and 75.Write a state-controlled loop that adds all these randomly generated numbers until a value larger than 60 is generated. When the
An array is a list of data items that:a. all have the same typeb. all have different namesc. all are integersd. all are originally set to null ('\0')e. none of the above
The value contained within the square brackets that is used to indicate the length of the array must be a(n):a. classb. doublec. stringd. integere. none of the above
Which of the following array declarations would enable you to store the high temperature for each day of one full week?a. int temp1, temp2, temp3, temp4, temp5, temp6, temp7;b. int temp [7] = new
Assume an array called num is declared to store four elements. Which of the following statements correctly assigns the value 100 to each of the elements?a. for(x = 0; x < 3; ++x) num[x] = 100;b.
Choose the statement that does not apply to the following declaration:double [ ] totalCostOfItems = {109.95, 169.95, 1.50, 89.95};a. declares a one-dimensional array of floating-point valuesb.
What value is returned by the method named result?int result(int[ ] anArray, int num){int i, r;for (r = 0, i = 1; i < num; ++i)if (anArray[i] > anArray [r] )r = i;return (r);}a. the index of the
What is the effect of the following program segment?int[ ] anArray = new int[50];int i, j, temp;string inValue;for (i = 0; i < 50; ++i){Write("Enter Value");inValue = ReadLine( );anArray[i] =
Using the following declaration:char [ ] n = {'a', 'b', 'c', 'd', 'e'};What does n[1] refer to?a. ab. abcdec. bd. 'a'e. none of the above
Using the following declaration:int [ ] x = {12, 13, 14, 15, 16, 17, 18, 19};What does x[8] refer to?a. 19b. 18c. '\0'd. 0e. none of the above
Write an application that enables a user to input the grade and number of credit hours for any number of courses. Calculate the GPA on a 4.0 scale using those values. Grade point average (GPA) is
Print isosceles triangles. For each triangle, allow the user to input two values: a character to be used for printing the triangle and the size of the peak for the triangle. Test the input for valid
Desk run or trace the following code segment, showing every value that goes into each variable.for (i = 0; i < 3; i++)for (j = 4; j > 0; j--)WriteLine ("{0}\t{1}", i, j);
Create an application that contains a loop to be used for input validation.Valid entries are positive integers less than 100.Test your program with values both less than and greater than the
Write an application that will enable a vendor to see what earnings he can expect to make based on what percentage he marks up an item.Allow the user to input the wholesale item price. In a tabular
Write a program that generates 1000 random numbers between 0 and 100,000. Display the number of odd values generated as well as the smallest and the largest of values. Output should be displayed in a
Write a program to allow multiple sets of scores to be averaged. Valid entries must be numeric and in the range of 0 through 100.Calculate the average of the scores entered. Allow any number of
Create an application that can be used to calculate the total amount due for purchases. Allow any number of items to be entered. Determine the total due including sales tax and shipping. Sales tax of
Write a program that allows the user to input any number of hexadecimal characters. Sum the values and display the sum as a hexadecimal value.Treat each single inputted character as a separate value.
Write a program that produces a multiplication table with 25 rows of computations. Allow the user to input the first and last base values for the multiplication table. Display a column in the table
Write an application that can be used to determine if three line segments can form a triangle. Prompt the user for the length of three line segments as integers. If non-numeric characters are
Which of the following adds 42 to the element at the fifth physical spot?int [ ] x = {12, 13, 14, 15, 16, 17, 18, 19};a. x[5] += 42;b. x[4] += 42;c. x[5 + 42];d. x = 42 + 5;e. none of the above
To convert all the uppercase letters in a string to their lowercase counterpart, you can use the _______________method of the string class.a. IsLower( )b. ConvertLower( )c. Lower( )d. ToLower( )e.
Create a Windows application that can be used to input a user’s name.Include an appropriate label indicator for the name and a textbox for the input entry. A button labeled Submit should retrieve
Given the delegate declaration delegate void PerformsSomeTask(int arg1, double arg2);which of the following represents a method heading that could be associated with the delegate?a. int
The signature for a method includes only the:a. return type, method name, number of parameters, and the data type of the parametersb. method name and return typec. number of parameters and the data
A multicast delegate is one that:a. has more than one method wrapped to itb. has more than one parameterc. has more than one instance of itself created in a programd. has more than one return typee.
What method is used with the Items property to populate a ListBox control with the contents from an array?a. Populate( )b. Add( )c. AddArray( )d. AddRange( )e. all of the above
One distinguishing characteristic between a ListBox control object and a ComboBox control object is that:a. Multiple selections are possible with ListBox objects.b. ComboBox objects are used for
A default event-handler method for a ListBox object is:a. KeyPress( )b. Click( )c. SelectedItem( )d. SelectedIndexChanged( )e. Selected( )
The property that returns a collection of the indexes selected for a ListBox object is:a. SelectedIndexb. SelectedIndicesc. Textd. Itemse. SelectedItems
ComboBox objects offer the added functionality over a ListBox object of:a. allowing values to be removed at run timeb. allowing multiple selections to be madec. including a scroll bar for moving down
Assuming comboBoxData is instantiated as a ComboBox, which of the following statements would retrieve its selection and place it in a string variable?a. string s = ComboBox.Selection;b. string s =
Given the delegate declaration delegate void PerformsSomeTask(int arg1, double arg2);which of the following statements would appear to create a delegate instance of PerformsSomeTask( ) with no syntax
What namespace must be referenced in order to instantiate objects from control classes such as Label, Button, and TextBox?a. Systemb. Windowsc. System.Windows.Formsd. System.Windows.Controlse.
Create a Windows application that can be used to change the form color.Your form background color should initially be blue. Provide at least two buttons with two different color choices and a Reset
Create a Windows application that contains two textboxes and three buttons. The textboxes should be used to allow the user to input two positive numeric values. The buttons should be labeled Add and
Showing 500 - 600
of 5434
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last