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
Revise the solutions for Exercises 22 and 23 to include a try block and at least two appropriate catch clauses inside the method.
Describe the differences between retrieving data from a text file versus retrieving it from a binary file.
Write a C# program that prints the current directory and the name and size of all files that are stored in the directory. Your display should be aesthetically pleasing (numbers should be aligned and formatted).
Use Notepad to place 20 integer values in a text file. Write a C# program to retrieve the values from the text file. Display the number of values processed and the average of the values, formatted with two decimal places. Also display the smallest value and the largest value. Hint: To simplify the
Write a program that enables the user to input name, address and local phone number, including area code. The phone number should be entered in a format to include dashes between the numbers (i.e. xxx-xxx-xxxx). Store the values in a text file. Surround the phone number with asterisks and store
Write a program that displays a graphical user interface (Windows form) that allows multiple names, e-mail addresses, and local phone numbers to be entered. Store the values in a text file. Retrieve and store just the numbers for the phone number. Use separate lines for each person’s data.
Write a program that stores 50 random numbers in a file. The random numbers should be positive with the largest value being 1000. Store five numbers per line and 10 different lines. Use the Random class to generate the values.Include appropriate exception-handling techniques in your solution.
Write a program that retrieves the values stored in a text file. The file should contain 10 different rows of data with five values per line. Display the largest and smallest value from each line. Include appropriate exception-handling techniques in your solution. Hint: If you completed Programming
Write an application that retrieves a student name and three scores per line from a text file. Process the values by calculating the average of the scores per student.Write the name and average to a different text file.Display what is beingwritten to the new file. Test your application with a
Write a program that produces a report showing the number of students who can still enroll in given classes. Test your solution by retrieving the data from a text file that you create using a text editor, such as Notepad. Some sample data follows. Include the name of the class, current enrollment,
Write a graphical user application that accepts employee data to include employee name, number, pay rate, and number of hours worked. Pay is to be computed as follows: Hours over 40 receive time-and-a-half pay. Store the employee name, number, and the total amount of pay (prior to deductions)in a
Allow the user to enter multiple sets of five numbers. Store the numbers in a binary file. For each set of values, store the average of the numbers prior to storing the next set of values. For example, if the user entered 27 78 120 111 67 as the first set of values, the first values written to the
An in-memory representation of multiple rows and columns of data from the database is stored in what type of object?a. data providerb. data readerc. datagridd. datasete. data adapter
All of the following are examples of ADO.NET data providers except:a. OLE DBb. Oraclec. ODBCd. Sql Servere. Access
Which of the following is the class name of a gridlike structure used to display data from a database?a. ComboBoxb. ListBoxc. DataGridViewd. Gride. GridData
Databases store information in records, fields, and:a. data providersb. gridsc. columnsd. tablese. commands
The core classes available with each data provider include all of the following except:a. Connectionb. DataAdapterc. Commandd. DataSete. DataReader
Each data provider class is grouped and accessible through its:a. namespaceb. databasec. datagridd. providere. system
Which of the following is a valid SQL statement that retrieves all four columns from the customer table?a. SELECT ALL FROM customerb. SELECT * FROM customerc. SELECT customerd. SELECT , , , , FROM customere. SELECT@@@@FROM customer
Parameters for SQL Server SQL statements are written slightly different from those written for an Access database. With SQL Server, a parameter is indicated using:a. @ followed by an identifierb. @ without an identifierc. ? followed by an identifierd. @ without an identifiere. a params keyword
The SQL clause that can be added to a SELECT statement to retrieve data from multiple tables is:a. BETWEENb. INNER JOINc. CROSS CONNECTIONd. WHEREe. UPDATE
The following namespaces (System.Data.OleDB, System.Data.SqlClient, System.Data.Odbc, System.Data.OracleClient) include classes for different:a. data providersb. file streamsc. ADO.NET applicationsd. databasese. data readers
For read-only access to databases, which ADO.NET class is used?a. DataSetb. DataAdapterc. CommandBuilderd. Connectione. DataReader
To provide access to an Access database management system, which data provider is used?a. System.Data.OleDbb. System.Data.SqlClientc. System.Data.Odbcd. System.Data.OracleCliente. Microsoft ACE.OLEDB.12.0
Which class is used with the dataset class to facilitate using a disconnected database?a. DataAdapterb. DataReaderc. Commandd. OleDbConnectione. Fill
To avoid writing additional SQL statements to update a live database, you instantiate an object of which class?a. DataAdapterb. DataReaderc. Connectiond. CommandBuildere. DataGrid
To release the database so that it can be used by other applications, which method should be invoked?a. ReleaseDb( )b. Release( )c. StopAccess( )d. Close( )e. none of the above
To retrieve specific records from a database, you could create a new query and have it stored as a method using an object of the class.a. Datasetb. DataProviderc. TableAdapterd. Connectione. Command
Which method is used to originally populate a data-bound control?a. Dataset Fill( ) methodb. Dataset Update( ) methodc. TableAdapter Fill( ) methodd. BindingNavigator Save( ) methode. PageLoad( ) event-handler method
In Visual Studio, the tool that enables you to connect to a database and automatically populate a dataset object using a TableAdapter object is the wizard:a. Data Source Configurationb. Data Sourcec. Query Builderd. DataSet Designere. TableAdapter Query Configuration
Which window is used in Visual Studio to display dataset tables so they can be dragged and dropped onto the form?a. Server Explorerb. Propertiesc. DataSet Designerd. Data Sourcese. Solution Explorer
A connection string contains:a. a using directiveb. the name of the data sourcec. the version number of database management systemd. the list of fields in the databasee. a SQL statement
Explain how the dataset, table adapter, and a data grid object are used to update a database.
Write SQL statements for the following:a. Retrieve all partNumber and partDescription columns from a Parts table that has 15 different columns.b. Retrieve records from a Parts table for partNumbers 1000 through 2000.Display the partDescription only.c. Insert a new record into a Customer table.
What happens when you drag a dataset table from the Data Sources window onto a blank form?
How can you have controls (other than the default Data Sources window controls)display data from a database table?
How does a table adapter differ from a data adapter?
Create a small Family database with one table to include data about members of your family. Include data fields such as family member number, first name, last name, type of relationship, hometown, and age. You can be creative with the family member number or use the autogenerated number from the
Using the database created in Programming Exercise 1, modify your solution to only display the names of the members of your family in a data grid. Dock the grid so that it fills the form. Change the color of the data grid columns, increase the size of the font, choose appropriate headings for your
Using the database created in Programming Exercise 1, write a C# program to only display the names of the members of your family who are over 21 years of age. Display their name, age, and relationship to you. Provide an appropriate heading for the displayed items on the form and format the grid
Using the database created in Programming Exercise 1, write a C# program to display the names and type of relationship of the members of your family who live in the same hometown as you do. Do not include yourself in the query result. It may be necessary for you to go back into your database and
Create a small BankAccount database with one Account table. The Account table should have fields for account number, customer last and first names, and current balance. The type of database (SQL Server or Access) will be determined by your instructor. Populate the table with 8-10 records. Design a
Create a small Sports database with two tables: Team and Athlete. The Team table should include fields for the type of team (e.g., basketball), coach’s name(both last and first), and the season the sport is most active (S for spring, F for Fall, or B for both). The Athlete table should include
Create a Books database to include two tables: BookTable and CourseBookTable. The BookTable table should have fields for ISBN number, title, copyright date, primary author, publisher, and number of pages. The CourseBookTable table should have fields for course number and ISBN.Populate the tables
Create a small database to include customer data. Include the customer numbers, customer names, and customer directional location. Place at least eight records in the database. For the customer directional location field, use the designations of N for North, S for South, and so on. The type of
Using the database created in Programming Exercise 8, write a C# program to display the customer number and name in a data grid. Format the grid control so that it is professionally aesthetically appealing. Allow the user to add records to the database. If your designed solution involves the use of
Using the database created in Programming Exercise 8, write a C# program that retrieves records from the customer table and displays them in a grid control. Allow the user to select an entry from the data grid and display the values selected in text boxes with appropriate labels. Display the
.NET Web applications differ from Windows applications in that Web applications must take the following into consideration:a. Multiple users need to be able to access the application at the same time.b. An application must be viewable by multiple types of platforms, including Linux and Windows.c.
The term Web application is synonymous with:a. Web serverb. IISc. Web Formsd. Web pagee. Web site
Interaction with users on Web applications cannot include the use of:a. MessageBoxb. Labelc. TextBoxd. ListBoxe. Button
The term used to reference converting an HTML document to a viewable format for display purposes is:a. requestb. hostc. illustrated. viewStatee. render
Web pages do not require any processing by the server when they only include which of the following?a. HTML controlsb. HTML server controlsc. Web Forms controlsd. HTML controls or HTML server controlse. HTML controls, HTML server controls, or Web Forms controls
Presentational attributes, like sizes and colors of fonts and alignment of text can be placed in a separate file if are used.a. Cascading Style Sheetsb. Web controlsc. Master pagesd. HTML server controlse. none of the above
Classic ASP applications are characterized by which of the following?a. Program statements written in languages such as Java are included inside the HTML file.b. A code-behind file is created.c. Only formatting HTML tags can be used with the application.d. Only static pages can be developed.e.
ASP.NET applications are characterized by which of the following?a. Program statements written in languages such as Java are included inside the HTML file.b. A code-behind file is created.c. Only formatting HTML tags can be used with the application.d. Only static pages can be developed.e. Script
The HTML control property used to set the text on a label is:a. Textb. Namec. InnerTextd. IDe. none of the above
When you set property values for Web Forms controls, the program statements referencing the settings are:a. placed in the code-behind fileb. placed in the .aspx.cs filec. stored in the .aspm filed. stored in the file containing the HTML tagse. none of the above
The default home directory for storing C# Web applications when IIS is used is:a. C:\CSharpProjectsb. C:\localhostc. C:\InetPub\wwwrootd. C:\WebAppse. none of the above
Events associated with which of the following automatically trigger a postback to the Web server?a. ListBoxb. TextBoxc. DropDownListd. Buttone. all of the above
Which control is often used to display data from a database table?a. DataGridb. DataTablec. Tabled. DataListe. none of the above
A file ending with the extension of .asmx is associated with which type of application?a. ASP.NET Web pageb. smart devicec. Web serviced. Windowse. classic ASP
The validation control used to make sure values have been entered into a field is:a. RangeValidatorb. FieldRequiredValidatorc. CompareValidatord. RequiredFieldValidatore. Required
To work programmatically with the Calendar control, instantiate an object of the ________________- class.a. Calendarb. DateTimec. Dated. CalendarDatee. none of the above
Web services are applications that return:a. datab. program statements with value-added logicc. graphical user interfacesd. fully functioning Web applicationse. none of the above
The SDK for mobile app development includes:a. Windows phoneb. emulatorc. hyper-Vd. virtual machine managere. all of the above
A file ending with the extension of .xaml is associated with which type of application?a. WebServiceb. WebClassc. Web applicationd. Mobile applicatione. all of the above
Master pages also require one or more:a. content pagesb. serverc. Web serviced. HTML controle. none of the above
Describe how the classic or traditional ASP programming model differs from the ASP.NET programming model for creating Web pages.
How do dynamic pages differ from static pages?
Compare and contrast HTML controls with Web Forms controls in terms of the code generated and the property values that can be set.
Identify and describe three types of validation controls that can be added to a Web application.
Create a Web application that enables users to select from a Calendar control object the date of their next exam. Using program statements, retrieve their selection and then display the date along with an appropriate message. If they select a date in the past, display a message and allow them to
The computer club is selling T-shirts. Create a Web site that allows users to enter their first and last names, phone number and e-mail address. Allow users to select sizes (S, M, L, XL, and XXL) and quantity. Add statements that process the order by calculating the total cost. All shirts except
Using Web Forms controls, create a Web application to store a user’s To Do List.Include two TextBox objects, a Button object, and a ListBox object.Allow the user to input their name in one textbox and To Do tasks into the other TextBox. Use those values to populate the ListBox object. Allow the
The computer club has decided to take a field trip to the hometown of one of the members during spring vacation. To determine the destination, each member has been charged with creating a Web page to highlight the features of his hometown.Create a Web application using the ASP.NET Web Forms site
Create a similar application to what you developed in Exercise 4 using the ASP.NET Empty Web Site Template. Include an HTML server control that causes a message to be displayed (on a Label object) when the user clicks a button. The message should include additional details about the locale.
Create a dynamic Web site that functions like a calculator. Add features for addition, subtraction, multiplication, division, modulation, and so on.
Create a Web application that enables the user to enter first name, last name, and e-mail address. Accept those values and store them in a text file. Allow the user to input the path where the file should be stored. After retrieving the values from the user, display on the Web page both the full
Create a Web site that retrieves and displays the current department chairs from a database. The StudentDataBase.accdb Access database used with examples in this book includes a major table that stores the major id, major name, department chair, and the department phone number. Create a Web site
Create a smart device currency converter application. Select two markets, such as U.S. dollar and the Euro. Research the current equivalents and use those values for your calculations. Include an image control and a control that enables the user to input a value. Display the formatted value entered
Create a smart device application that allows users to input their names, year of birth, and student IDs. Create and display a new security hash value. The new value should consist of the first initial of their names followed by the identification number and the last two digits of their birth year.
What would be the result of the following conditional expression?int i = 0;while (i < 10) ;i++;Console.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{Console.WriteLine(counter);counter--;}while (counter > 0);
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 loop stops, display the number of acceptable generated values and the sum of those values.
What would be the output produced from the following statements?int i = 0;while (i < 0){Console.Write("{0}\t", i);i++;}Console.Write("{0}\t", i);a. 0b. an infinite loopc. an errord. 0 0e. 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)Console.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++)for (j = 0; j < 4; j++)Console.WriteLine("{0} {1}", i, j);a. 20b. 6c. 9d. 12e. none of the above
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
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 negative items enteredd. the sum of all negative items enterede. the sentinel value
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
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
Which of the following represents a pretest loop?a. whileb. do. . .whilec. ford. a and be. a and c
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--)Console.WriteLine ("{0}\t{1}", i, j);
Write a program that generates 1000 random numbers between 0 and 100000.Display the number of odd values generated as well as the smallest and the largest of values. Output should be displayed in a Windows message box.
The individual variables in the array are called the elements of the array.
One common identifier names the entire structure.
An array may contain any number of variables of the same type.
Allow the user to input two values: a character to be used for printing an isosceles triangle and the size of the peak for the triangle. Test the input for valid characters. The size of the triangle should not be larger than 10.If an invalid entry is entered for size or if the value entered for
Showing 800 - 900
of 5433
First
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Last
Step by Step Answers