New Semester
Started
Get
50% OFF
Study Help!
--h --m --s
Claim Now
Question Answers
Textbooks
Find textbooks, questions and answers
Oops, something went wrong!
Change your search query and then try again
S
Books
FREE
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
Tutors
Online Tutors
Find a Tutor
Hire a Tutor
Become a Tutor
AI Tutor
AI Study Planner
NEW
Sell Books
Search
Search
Sign In
Register
study help
computer science
systems analysis design
C# Programming From Problem Analysis To Program Design 4th Edition Barbara Doyle - Solutions
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 y-coordinates to indicate where the form should be positioned. When the user clicks the button, the window should be moved to that new point. Be
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 AcceptButton. The form should contain labels and textboxes to allow the user to input trip
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. The textbox should be masked to some character of your choosing so that the characters entered by the
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, or they may enter many parts to their name, as in Jr., Sr., II, or III. Disallow entries of single one word names.If
Create a Windows application that can be used to determine distance traveled given speed and time. Provide textboxes for time and speed and a button to calculate the distance. Be sure that only numeric data is able to be entered into the textboxes. Experiment with the controls’ properties. Spend
Create a Windows application that functions like a banking account register.The graphical user interface should initially allow the user to input the account name, number, and initial balance. Ensure that the full name is entered for the customer and that only numeric values are entered for number
Create the higher/lower guessing game using a GUI. Allow users to keep guessing until they guess the number. Keep a count of the number of guesses. Choose two colors for your game: one should be used to indicate that the value the users guessed is higher than the target; the other is used to
After you type the text for a menu using the MainMenu control, what else must be done before the menu will be seen on the form?a. Set the Menu property on the form to the name of the menu.b. Set the Form property on the menu to the name of the form.c. Create menuItems subordinate to the menu.d.
When you type the text for the Help menu option, which of the following creates a shortcut of Alt+P for the Help?a. Help(Alt p)b. &Helpc. &Hel&pd. Hel&pe. Help(Alt &p)
If you want all options to be displayed on the screen, but allow only one of the options to be selected, which type of structure is normally used?a. check boxb. combo boxc. menud. radio buttone. text box
Create an application that can be used to allow users to enter information such as their names, e-mail addresses, and phone numbers. The application should provide a minimum of four features. The first retrieves and displays the information entered by the user. Output should be displayed in a
The computer club is selling T-shirts. Create an attractive user interface that allows users to select sizes (S, M, L, and XL) and quantity. Which controls would be most appropriate? Remember, the fewer keystrokes required of the user the better. Provide a menu labeled “Process”. Display the
Create a Windows application that can be used as a sign-up sheet for ski equipment for the Flyers Sports Club. The club has ski equipment that it makes available to members at a minimal charge. In an attempt to determine what type of equipment members might need for an upcoming trip, they have
Create a graphical user interface that can be used by a community group to enable youths to sign up for different sporting events. Include radio buttons with a minimum of five sports. Wire a single event-handler method to each of the radio buttons. Program the method to display a different message
Create an Inspirational Message Displayer that has one ComboBox object with a list of at least five of your favorite sayings or inspiration messages. Your design should include the capability of letting users enter their own sayings. When a selection is made or a new entry is typed, display the
Create an order form that allows bags to be purchased. There are six different types: full decorative, beaded, pirate design, fringed, leather, and plain. Create a ListBox object for the different styles. Include a ComboBox for quantity. Quantities up to 10 should be provided. After the user makes
Add to the application in Exercise 6 by including a control that allows the user to determine the type of shipping they desire. Include a set of radio buttons that contain shipping options of overnight, three day, and standard. Add the price for each bag to the listbox selection as follows:full
Add to your solution in Exercise 2 by including two more sizes, XSmall and XXLarge. Add statements that process the order by calculating the total cost. Each shirt is $16 except the XSmall and XXLarge; their specialty prices are $20.00 each. Include an “Add to Cart” option from the
Create a Windows application for purchasing floor covering. Allow the length and width (feet and inches) of a room to be entered. Be sure to include program statements that will keep your program from crashing if they enter nonnumeric characters for the room dimensions. Using the tab control,
From the following partial code listing, identify the name(s) of eventhandler method(s) that would need to be written. To what object(s) are they wired? public class Question System.Windows.Forms.Form { private private System.Windows.Forms.Label labell; System.Windows.Forms.TextBox txtBxActivity;
For the following table, identify which properties can be used to set the given values for the controls. Desired action Get the selected item from a ComboBox object Change the label over a group box Arrange the items in a list box in ascending order Change the color of the text in a label Change
Which property is used with CheckBox and RadioButton objects to determine whether their option is selected?a. Selectedb. SelectedIndexc. SelectedItemd. Checkede. none of the above
Wiring an event handler to multiple objects involves:a. using the same method to handle the events fired for more than one objectb. selecting the same objects property for each event-handler methodc. creating multiple methods that do the same taskd. naming the object’s Event property with an
The GroupBox provides more functionality for which type of objects?a. ComboBoxb. ListBoxc. CheckBoxd. RadioButtone. TextBox
Click( ) events are the default event for which type of object?a. Buttonb. RadioButtonc. MenuItemd. CheckBoxe. all of the above
Which statement could be used in C# to set a ListBox object’s selection mode to MultiExtended if you did not have Visual Studio’s Properties window available? The name for the ListBox object is lstBox1.a. lstBox1.SelectionMode = SelectionMode.MultiExtended;b. lstBox1 = MultiExtended;c.
Which property can be set for a form to enable the Enter key to function like a mouse click for a selected Button object?a. Enterb. Button_Clickc. EnterKeyd. AcceptButtone. AcceptKey
Describe what is required to make a menu option clickable or a check box functional.
When is a RadioButton control preferred over a CheckBox control?When is a ComboBox control preferred over a ListBox control?
Identify two control options you might add to a Windows form to enable more controls to be available without consuming a lot of additional space.
Create an application for a Pizza Delivery Company. You might check out the graphical user interface shown in Figure 10-21. Your solution does not need to resemble this one; however, it might give you some ideas.You must provide a place for the user to enter their contact information(i.e., address,
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 be necessary to do it manually.
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
Write an application that will let you keep a check on how well six salesmen are performing selling three different products. You should use a two-dimensional array to solve the problem. Allow the user to input any number of sales amounts. Do a compile-time initialization of the salesperson’s
Revise your solution for problem 2 so that you display the total sales per salesman. As with your solution for exercise #2, include the first and last names for the salesmen in an array. When you display your final output, print the salesman’s last name only, sales for each product, and the final
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 separate their first and last name with a space. Ask for their birthdate in the format of mm/dd/yyyy.
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 display the results with the last name listed first, followed by a comma and then the first name. If
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 0 and 100.Search the array for the largest value. Display the array values, numbers aligned, and the indexes
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 squared value of the element found in column 1.Using the Show( ) method of the MessageBox class, display a
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 Latin that doesn’t follow all the Pig Latin syntax rules). Use predefined methods of the Array and string
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. Zumba is offered at 1, 3, 5, and 7 p.m.; spinning is offered at 2, 4, 6, and 8 p.m. When attendees
Write an application that enables you to randomly record water depths for five different locations at 0700 (7 a.m.), 1200 (noon), 1700 (5 p.m.), and 2100 (9 p.m.). The locations are Surf City, Solomons, Hilton Head, Miami, and Savannah. For ease of input, you may want to code the locations(i.e.,
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 do a compiletime initialization of a 12 x 5 two-dimensional array. Display both the two-dimensional
Explain the difference between the .NET Hashtable and Dictionary classes.
Which member in the ArrayList class can be used to get or set the number of elements that an ArrayList can contain?a. Lengthb. Sizec. Dimensiond. Ranke. 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. Write(result(anArray, 3));b. result(anArray, 30);c. Write(result(anArray[ ], 3));d. result(anArray[ ], 30);e. none of the above
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 arraysd. only be used with arrays smaller than 1000 elementse. not be used with dynamic arrays
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 day. The word day should be set to all uppercase.b. Create a new string array that contains the eleven
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. WriteLine(anArray.Length);b. WriteLine(anArray[1, 2]);c. WriteLine(anArray[0, anArray.GetLength(0) − 2]);d. WriteLine(anArray[0,
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 of cArray.b. Write a for loop to increment each element in cArray by 5.c. Write a foreach loop to
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 array to hold the names of 10 people. You should be able to reference each person’s first name
One of the differences between a console application and a Windows application is:a. Classes can only be used with console applications.b. One font size is used with console applications.c. Variables must be declared with console applications.d. Windows applications require that program statements
Which namespace includes most of the Control classes for developing Windows applications?a. Systemb. System.Windows.Controlsc. System.Windows.Components.Formsd. System.Windows.Formse. System.Windows.Drawing
Which of the following inherits members from the Control class?a. Labelb. Formc. TextBoxd. a and ce. all of the above
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
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 += new System.EventHandler(this.btnCalculate_Click);d. this.btnCalculate = new
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 audience.d. Use contrast to call attention to something.e. all of the above
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 directivee. collapsible segment of code that must be used for Windows applications
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 approach.c. Create at least two methods.d. Create separate classes for each.e. all of the above
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 are added.c. Change the size of the window to 400 by 400.d. Associate a name of designForm with the
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 GUIs.
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 button1ClickEvent;c. this.Controls.AddRange(this.button1ClickEvent);d. button1.Click = "Register Me";e.
The statement that actually constructs or instantiates a Button object is:a. this.button1 = new System.Windows.Forms.Button( );b. private System.Windows.Forms.Button button1;c. this.Controls.AddRange(this.button1);d. button1.Name = "A button";e. button1.Click += new
If the System.Windows.Forms namespace is imported, the following statement:this.textbox1 = new System.Windows.Forms. TextBox( );can be written as:a. this.textbox1 = new TextBox( );b. textbox1 = new TextBox( );c. textbox1 = new System.Windows.Forms.TextBox( );d. all of the abovee. none of the above
The ___________ is the front end of a program that represents the presentation layer or the visual image of the program.a. interfaceb. controlc. Visual Studiod. IDEe. framework
A(n) ___________ is a notification from the operating system that an action has occurred, such as the user clicking the mouse or pressing a key.a. method callb. statementc. eventd. GUIe. handler
Which of the Control objects is viewed as a container that can hold other objects when you design a Windows application?a. Controlb. Buttonc. Windowd. Framee. Form
Which property is used to set the caption for the Windows title bar?a. Captionb. Textc. Titled. TitleBare. WindowTitle
The class heading public class AForm : Form indicates that:a. Form is a derived class of the AForm class.b. AForm is the base class for the Form class.c. The class being defined is identified as Form.d. AForm inherits the members of the Form class.e. none of the above
If the name of the class is GraphicalForm, the following:public GraphicalForm( ) is an example of a(n):a. accessor methodb. propertyc. constructord. mutator methode. data member
You would use an IDE such as Visual Studio to construct Windows applications because it has the following capability:a. drag-and-drop constructionb. IntelliSense featuresc. access to the Properties window listing properties and eventsd. access to the Toolbox for dropping controlse. all of the above
Click is an example of a(n):a. eventb. propertyc. methodd. controle. handler
Visual Studio has a number of windows that can be viewed during design. The window used to hold controls that are dragged and dropped during construction is called the:a. Propertyb. Code Editorc. Form Designerd. Solution Explorere. Class View
Delegates store:a. the address for signatures of datab. data and methods about the events in a programc. eventsd. the address of methodse. all of the above
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 errors?a. PerformsSomeTask task1 =new PerformsSomeTask (CalculateThis);b. PerformsSomeTask task1
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 CalculateThis(int value1, double value2)b. double CalculateThis(int value1, double value2)c. void
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 type of the parametersd. method name, number of parameters, and the data type of the parameterse.
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. none of the above
The following statement best sums up a delegate’s relationship to an event:a. Delegates are instances of events.b. Delegates are used to call event-handler methods.c. Delegates must be registered with events.d. The event maintains a list of delegates in the program.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 output only.c. A scroll bar can be seen with ComboBox objects.d. It is easier to program the ComboBox
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 the itemsd. containing a text box for values to be entered at run timee. none of the above
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 = ComboBox.comboBoxData.Text;c. string s = comboBoxData.Text;d. string s.Text = comboBoxData.Text;e.
After you type the text for a menu using the MainMenu control, what else must be done before the menu will be seen on the form?a. Set the Menu property on the form to the name of the menu.b. Set the Form property on the menu to the name of the form.c. Create menuItems subordinate to the menu.d.
When you type the text for the Help menu option, which of following creates a shortcut of Alt+P for the Help?a. Help(Alt p)b. &Helpc. &Hel&pd. Hel&pe. Help(Alt &p)
If you want all options to be displayed on the screen, but allow only one of the options to be selected, which type of structure is normally used?a. check boxb. combo boxc. menud. radio buttone. text box
Which property is used with CheckBox and RadioButton objects to determine whether their option is selected?a. Selectedb. SelectedIndexc. SelectedItemd. Checkede. none of the above
Wiring an event handler to multiple objects involves:a. using the same method to handle the events fired for more than one objectb. selecting the same objects property for each event-handler methodc. creating multiple methods that do the same taskd. naming the object’s Event property with an
The GroupBox provides more functionality for which type of objects?a. ComboBoxb. ListBoxc. CheckBoxd. RadioButtone. TextBox
Click( ) events are the default event for which type of object?a. Buttonb. RadioButtonc. MenuItemd. CheckBoxe. all of the above
Which statement could be used in C# to set a ListBox object’s selection mode to MultiExtended if you did not have Visual Studio’s Properties window available?The name for the ListBox object is lstBox1.a. lstBox1.SelectionMode = SelectionMode.MultiExtended;b. lstBox1 = MultiExtended;c.
Which property can be set for a form to enable the Enter key to function like a mouse click for a selected Button object?a. Enterb. Button_Clickc. EnterKeyd. AcceptButtone. AcceptKey
Describe what is required to make a menu option clickable or a check box functional.
When is a RadioButton control preferred over a CheckBox control? When is a ComboBox control preferred over a ListBox control?
How is a delegate related to an event?
Showing 600 - 700
of 5433
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last
Step by Step Answers