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 calculates a student’s GPA on a 4.0 scale. Grade point average (GPA) is calculated by dividing the total amount of grade points earned by the total amount of credit hours
Prompt the user for the length of three line segments as integers. If the three lines could form a triangle, print the integers and a message indicating they form a triangle. Use a state-controlled
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 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 allows the user to input any number of hexadecimal characters. Sum the values and display the sum as a hexadecimal value. Within the loop, convert each character entered to its
Create an application that determines the total due including sales tax and shipping. Allow the user to input any number of item prices. Sales tax of 7.75% is charged against the total purchases.
Write a program to calculate the average of all scores entered between 0 and 100.Use a sentinel-controlled loop variable to terminate the loop. After values are entered and the average calculated,
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
To access an array element, use an index enclosed in square brackets.
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;Console.Write("{0}\t", n);} while (????);a. n < 11b. n < 10c. n <
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
With the do. . .while posttest loop structure, the statements are executed once before the conditional expression is tested.
The foreach statement is new and is used to iterate or move through a collection, such as an array. It does not require a loop control variable to be incremented and tested to determine when all data
The for statement is considered a specialized form of the while statement.It packages together the initialization, test, and update—all on one line.
A state-controlled loop, also referred to a flag-controlled loop, uses a special variable—not the variable used to store the data that is being processed. With a state-controlled loop, the body of
The MessageBox.Show( ) method is used to display information to users in a format that resembles Windows applications.
Sentinel-controlled loops are also referred to as indefinite loops. They are useful when the number of repetitions is not known before the loop’s execution.For interactive input, a sentinel value
With counter-controlled loops, it is important to think through test cases and check endpoints to ensure they have been used to avoid off-by-one errors.
An infinite loop does not have provisions for normal termination. Infinite loops occur when the loop’s conditional expression never evaluates to false or there is some inherent characteristic or
When you know the number of times the statements must be executed, you can use a counter-controlled loop.
The looping structures available in C# include while, do. . .while, for, and foreach statements. The do. . .while loop is a posttest. The others are pretest loop structures. With pretest, the
Based on a predetermined condition, iteration enables you to identify and block together one or more statements to be repeated.
The three programming constructs found in most programming languages are simple sequence, selection, and iteration.
A loop can be included within the body of another loop. When this occurs, the innermost nested loop is completed totally before the outside loop is tested a second time.
C# offers a number of jump statements that can alter the flow of control in a program. They include break, continue, goto, throw, and return statements.
What would be the output produced from the following statements?int aValue = 1;do{aValue++;Console.Write(aValue++);} while (aValue < 3);a. 23b. 234c. 1234d. 2e. none of the above
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){Console.WriteLine(num);num--;}a. for (num = 0; num < 10;
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 <
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.
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.
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
Which loop structure can only be used with a collection or array?a. foreachb. forc. whiled. do. . .whilee. none of the above
To write a sentinel-controlled loop to compute the average temperature during the month of July in Florida, the best option for a sentinel value would be:a. 67b. 1000c. 100d. ‘‘high
Loops are needed in programming languages:a. to facilitate sequential processing of datab. to enable a variable to be analyzed for additional processingc. to process files stored on hard drivesd. to
Regarding decisions about which type of loop to use—if you know your loop will always be executed at least once, then do. . .while is a good option.When a numeric variable is being changed by a
The break and continue statements should be used sparingly with loops.
When a continue statement is reached, it starts a new iteration of the nearest enclosing while, do. . .while, for, or foreach loop statement.
The Control class has a number of methods, including Focus( ), Hide( ), Select( ), and Show( ).
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
Write an application that creates a two-dimensional array. Allow the user to input the size of the array (number of rows and number of columns). Fill the array with random numbers between the 0 and
Write a program that creates a two-dimensional array with 10 rows and 2 columns. The first column should be filled with 10 random numbers between 0 and 100.The second column should contain the
reAay ouyay aay hizway ithway igPay atin?Lay? (Translated: ‘‘Are you a whiz with Pig Latin?’’) Write a program that converts an English phrase into a pseudo-Pig Latin phrase (that is Pig
Write an application that displays revenue generated for exercise classes at the Tappan Gym. The gym offers two types of exercise classes, zumba and spinning, six days per week, four times per day.
Write an application that enables you to randomly record water depths for 5 different locations at 0700 (7 a.m.), 1200 (noon), 1700 (5 p.m.), and 2100(9 p.m.). The locations are Surf City, Solomons,
Console applications and Windows applications interact differently with the operating system. With console applications, the program calls on the operating system to perform certain functions such as
An event is a notification from the operating system that an action has occurred, such as the user clicking the mouse or pressing a key on the keyboard.
With Windows applications, you write methods called event handlers to indicate what should be done when an event such as a click on a button occurs.
Another important difference in a Windows application is that unlike the sequential nature you can plan on with console-based applications, in which one statement executes and is followed by the
As the front end of a program, the interface is the visual image you see when you run a program. Windows applications not only function differently from console applications, they look different, and
Windows-based GUI applications are displayed on a Windows form. Form is a container waiting to hold additional controls, such as buttons or labels.Controls are objects that can display and respond to
The Visual Studio integrated development environment (IDE) automatically generates for you all the code needed for a blank Windows form. The amount of development time for Windows applications is
When you have a class defined that has the class name, followed by a colon and then another class name, you have inheritance. The second class is called the base class; the first is called the
Your design should take into consideration the target audience. Use consistency in the design unless there is a reason to call attention to something.Alignment should be used to group items. Avoid
Properties of the Form class include AutoScroll, BackColor, Font, ForeColor, Location, MaximizeBox, Size, StartPosition, and Text. Text is used to set the caption for the title bar of the form.
A preprocessor directive indicates that something should be done before processing. C# does not have a separate preprocessing step. The #region preprocessor directive in C# is used to explicitly mark
The System.Windows.Forms namespace includes many classes representing controls with names such as Button, Label, TextBox, ComboBox, MainMenu, ListBox, CheckBox, RadioButton, and MonthCalendar that
Write a program that allows the user to enter any number of names. Your prompt can inform the user to input their first name followed by a space and last name. Order the names in ascending order and
Write a two class application that creates a customer code to be placed on a mailing label for a magazine. Allow the user to input their full name with the first name entered first. Prompt them to
Revise your solution for problem 2 so that you display the total sales per salesman.Place the first and last names for the salesmen in an array. Write your solution so that any number of salesmen and
With the following declaration:int [ , ] points = {{300, 100, 200, 400, 600},{550, 700, 900, 200, 100}};The statement Console.Write(points[1, 2] + points[0, 3]); willa. display 900400b. display
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
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
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. none of the above
Which method in the ArrayList class can be used to place a value onto the end of the ArrayList?a. AddLast( )b. AddLastIndex( )c. Add( )d. Insert( )e. none of the above
Which method in the ArrayList class can be used to get or set the number of elements that an ArrayList can contain?a. Length( )b. Size( )c. Dimension( )d. Rank( )e. Capacity( )
Which class includes methods to create a dynamic one-dimensional structure?a. Arrayb. stringc. arrayd. ArrayListe. all of the above
A correct method call to a method that has the following heading would be:int result(int[ , ] anArray, int num)a. Console.Write(result(anArray, 3));b. result(anArray, 30);c.
With two-dimensional arrays a limitation on the foreach statement is that it can:a. only be used for read-only accessb. only be used with integral type arraysc. not be used with multidimensional
In order to retrieve a value stored in an object of the Queue class, you would use which method?a. Pop( );b. Push( );c. Dequeue( );d. Enqueue( );e. none of the above
Use the following string to answer questions a through e.string sValue = "Today is the first day of "+ "the rest of your life."a. Create a new string that has all lowercase characters except the word
Using the following declaration:int [ , ] anArray = {{34, 55, 67, 89, 99}, {22, 68, 11, 19, 45}};What would be the result of each of the following output statements?a.
Using the following declarations, write solutions for Steps a through e.int [ , ] cArray = new int [2, 3];string [ , , ] dArray = new string [5, 2, 6];a. Write a foreach loop to display the contents
Create array declarations for the following problem specifications.a. An array to hold the name of the largest 3 cities for 5 states. Initialize with the 5 states closest to your campus.b. A single
Explain the difference between the .NET Hashtable and Dictionary classes.
Write an application that creates and returns a one-dimensional array containing all the elements in the two-dimensional array. Store the values in a row major format. For testing purposes, you may
Write an application that will let you keep a tally of how well three salesmen are performing selling five different products. You should use a two-dimensional array to solve the problem. Allow the
The Control class has a number of properties, including Anchor, BackColor, Enabled, Font, ForeColor, Location, Name, Size, TabIndex, Text, and Visible. Names of properties are quite intuitive.
Controls that you add to a form are objects or instances of one of the predefined classes such as Label, TextBox, and Button. They inherit the properties, methods, and events from the Control class.
Which of the following design considerations leads to more user-friendly presentation layers for GUIs?a. Avoid clutter.b. Be consistent with font, color, and placement.c. Design for the target
The #region #endregion is an example of a C# .a. Windows class declaration statementb. required statement for creating Windows applicationsc. reference to a namespace called regiond. preprocessor
During design, how can you separate the business logic from the presentation layer?a. Create two forms, one for input and the other for output.b. Create two objects using an object-oriented
Describe at least three ways Windows applications differ from console applications.
Identify which property could be set so that a Form object would perform the following function:a. Change the background color for the form.b. Set the default font to Courier for all controls that
Describe what might be done to respond to a button click event.
List at least five issues to consider when you plan the design of graphical user interfaces.
Describe the process that must occur to get a TextBox object added to a Form object. In your description, consider not only how the process is performed with Visual Studio, but also what steps would
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 OK should retrieve and
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. Change the
Create a Windows application that contains two textboxes (with labels) and one button. The textboxes should be used to allow the user to input the x- and ycoordinates to indicate where the form
Create a Trip Calculator Windows application that can be used to determine miles per gallon for a given trip. Set the Form object properties of Name, ForeColor, BackColor, Size, Location, Text, and
Create a Windows application that contains two textboxes and two buttons. The textboxes should be used to allow the user to input two positive numeric values.The buttons should be labeled Add and
Create a Windows application that contains a textbox for a person’s name. Plan that the user may enter only first and last name, or they may enter first, middle, and last names. Include labels to
Create a Windows application that contains two textboxes and three buttons. One of the textboxes and one of the buttons are initially invisible. The first textbox should be used to input a password.
Create a Windows application that can be used to determine distance traveled given speed and time. Recall that distance = speedtime provide textboxes for time and speed and a button to calculate to
Create a Windows application that functions like a banking account register.Separate the business logic from the presentation layer. The graphical user interface should allow the user to input the
Which of the following might be the heading for an event-handler method?a. private void btn1_Click(object sender, System.EventArgs e)b. Application.Run(new TempAgencyForm());c. btnCalculate.Click +=
The property of the TextBox control that is used to set all characters to uppercase as they are typed is:a. CharacterCasingb. Textc. ToUpperd. UpperCasee. ConvertToUpper
The statement that registers a Button object click event with the operating system is:a. this.button1ClickEvent = new System.Windows.Forms.Button( );b. private System.Windows.Forms.Button
Label objects are normally used to provide descriptive text for another control. In addition to the inherited members, they have their own unique properties, methods, and events.
TextBox objects are probably the most commonly used controls, because they can be used for both input and output. In addition to the inherited members, they have their own unique properties, methods,
Showing 900 - 1000
of 5434
First
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
Last