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
Which of the following would store an integer in a binary file?a. Write7BitEncodedInt( )b. WriteInt( )c. WriteLine( )d. StoreInt( )e. none of the above
StreamReader is a direct descendent of:a. MarshalByRefObjectb. Objectc. Filed. TextReadere. IO
Streams can be used in C# for writing data to:a. text filesb. networksc. memoryd. binary filese. all of the above
To make a duplicate copy of a file, you could use a static method in the class:a. Fileb. StreamWriterc. Streamd. TextWritere. BinaryWriter
What method in the StreamReader class retrieves a full line of text-up until the newline character is encountered?a. Flush( )b. ReadBlock( )c. Retrieve( )d. ReadLine( )e. Peek( )
Using the verbatim string, you could write the full path of C:\CSharpProjects\ Ch13\WorkDirectory as:a. @"C:\CSharpProjects\Ch13\WorkDirectory"@b. @"C:\\CSharpProjects\\Ch13\\WorkDirectory"c.
In Visual Studio, if you do not specify the full path of a file, what directory is used?a. C:\b. the project directoryc. C:\App_Datad. bin\Debuge. C:\WorkDirectory
Which of the following is an abstract class?a. DirectoryInfob. Streamc. StreamReaderd. all of the abovee. none of the above
To append data onto the end of a text file:a. use the AppendStream classb. add the Append argument to the constructor for the FileStream classc. add the Append argument to the constructor for the
The members of the _______________ class allow you to create, move, copy, and delete files.a. Fileb. FileInfoc. Directoryd. DirectoryInfoe. File and FileInfo
To which namespace does the File class belong?a. Objectb. System.FileSystemc. System.Objectd. Object.IOe. System.IO
The File class:a. has only instance members, so to call one of its methods you must have an objectb. has only instance members, so to call one of its methods you must use the class namec. has only
When you are finished processing a text file, you should:a. call the Finished( ) methodb. call the Close( ) methodc. throw an exceptiond. erase the filee. reset the file
Which class allows you to use the Write( ) and WriteLine( )methods to write data to a text file?a. TextWriterb. FileWriterc. BinaryWriterd. StreamWritere. File
Which class allows you to use the Read( ) and ReadLine( ) methods to retrieve data from a text file?a. TextReaderb. FileReaderc. BinaryReaderd. StreamReadere. File
To avoid an IOException exception with files, you can either use a try. . .catch block or make sure there is a file before attempting to read characters from it. This can be done by:a. calling the
One difference between the DirectoryInfo class and the Directory class is:a. Methods of the Directory class allow you to move directories and files; DirectoryInfo does not.b. The DirectoryInfo class
All of the following are exception classes that are thrown in conjunction with files, except:a. DirectoryNotFoundExceptionb. EndOfStreamExceptionc. InvalidDataFileExceptiond. FileNotFoundExceptione.
Create a BankAccount class that can be used to maintain a bank account balance. Include appropriate constructors, properties, and methods to enable the account to be originally created and for
Write an application that can be used to count the frequency of characters in a paragraph. Allow the user to input several sentences using a graphical user interface. Display the count for nonzero
Revise the calculator application created in Exercise #7 to enable decimal values to be entered. Recall that an exception is not automatically thrown by the CLR when the divisor operand is a
Create a Windows application that has the functionality of a calculator and works with integral values. Allow the user to select buttons representing numeric values. If the user attempts to divide by
Create a multi-class solution that includes a WeightConverter class.The WeightConverter class should be used to convert standard weight measurements. In your list of options, include as a minimum
Create a multi-class solution that includes a Fraction class. Fraction should have data members of numerator and denominator and be used to represent the ratio of the two integer values. Include
Include exception-handling techniques with the traditional averaging program. Allow the user to input multiple sets of scores. Ensure that only numeric values are entered and that values fall between
Create a multi-class solution that can be used to calculate body mass index (BMI). The BodyMassIndexCalculator class should have data members of weight and height. Write an application that lets
Design an application that enables users to enter two values of type int. Write a method that retrieves the values and stores them and their products in separate structures. If you are designing a
Write an exception tester application that enables you to see the impact of exceptions being thrown. Include multiple catch clauses. Include in our investigation the ArithmeticException,
If an application is written to filter Exception, ArgumentException, IndexOutOfRangeException, and ArithmeticException, does it matter which order they should be listed? If so, what is the order?
Give one example of what would cause an IndexOutOfRangeException exception to be thrown.
Give one example of what would cause a FormatException exception to be thrown.
Give one example of what would cause an ArithmeticException exception to be thrown.
The result of division by zero is undefined for both integral and floatingpoint values. Describe how avoiding floating-point division by zero differs from integral division by zero.
The ApplicationException class is derived from:a. Systemb. SystemExceptionc. System.Exceptionsd. ExceptionApplicatione. Exception
The primary difference between using Step Into and Step Over is:a. Step Into halts at the last line of code inside a called method.b. Step Over halts at the first line of code inside a called
The Debugger in Visual Studio offers all of the following options for stepping, except:a. Step Intob. Step Overc. Step Outd. Step Throughe. none of the above
Which of the following lines contains information regarding a thrown exception named e?a. e.Messageb. e.ExceptionTypec. e.ExceptionInfod. e.ExceptionMessagee. e.Information
If a method throws an exception and the exception is not caught inside the method:a. The program automatically crashes.b. The rest of the program is executed, but the program statement(s)that caused
A marker that is placed in an application, indicating the program should halt execution when it reaches that point, is called a(n):a. exceptionb. debuggerc. watchd. pausee. breakpoint
The Debugger can be used to:a. observe syntax errorsb. rewrite the grammar for the programc. review what the output should bed. step through an applicatione. none of the above
C# Language Specifications are:a. the authoritative source for C# grammarb. the specifications that detail information on all aspects of the languagec. the authoritative source for C# syntaxd.
_____ errors are the easiest to discover and correct.a. Exceptionb. Compilerc. Run-timed. Logice. Omission
Two major types of errors found in programs are:a. compiler and syntaxb. compiler and exceptionsc. logic and grammard. compiler and run-timee. exceptions and logic
Writing a catch clause without including the parentheses and an argument list such as catch { }:a. generates a syntax errorb. requires a finally clausec. has the same effect as catch (Exception) {
To avoid an exception with files, you can use a try. . .catch block and include which exception class in your catch clause?a. File.ExistsExceptionb. IOExceptionc. FileExceptiond. ExceptionFilee. none
If an application is written to filter several exceptions including Exception, DivideByZeroException, and ArithmeticException, in what order should they be listed?a. Exception, DivideByZeroException,
What type of exception would be thrown if the following arithmetic were performed?double aValue = 0, bValue = 0;int result = (int) aValue / (int) bValue;a. FormatExceptionb. Invalid.CastExceptionc.
What type of exception would be thrown if a program statement attempted to access location 0 in an array defined to hold 20 elements?a. FormatExceptionb. Invalid.CastExceptionc.
What type of exception would be thrown if the user enters the wrong type of data when requested from the keyboard?a. FormatExceptionb. Invalid.CastExceptionc. NullReferenceExceptiond.
The segment of code that might create an unexpected problem should be:a. placed in a try blockb. placed in a catch blockc. placed in a finally blockd. placed on the outside of the try. . .catch. .
A Just-In-Time Debugging window is displayed when a(an):a. application is executedb. unhandled exception is thrownc. handled exception is thrownd. unhandled exception is caughte. handled exception is
Raising an exception is the same as:a. catching an exceptionb. trying a block of code that might create an exceptionc. throwing an exceptiond. defining a new exception classe. rolling back an
_____ are unexpected conditions that happen very infrequently.a. Bugsb. Conditionsc. Streamsd. Exceptionse. Objects
Create a housing application for a property manager. Include a base class named Housing. Include data characteristics such as address and year built. Include a virtual method that returns the total
Define an application to include classes for Student, GraduateStudent, and UndergraduateStudent. Create .DLL files for the three classes. Include characteristics in the Student class that are common
Create a base class titled ReadingMaterial. Include subclasses of Online, Book, and Magazine. Design your classes so that common characteristics are placed in the ReadingMaterial class. Provide the
Create a base class for a banking account. Decide what characteristics are common for checking and saving accounts and include these characteristics in the base class. Define subclasses for checking
Modify your solution for Exercise 5 so that the source code files for each of the classes you designed are available for edit within the solution project.Enhance the solution by defining an interface
Provide a test class to demonstrate that your design of a base team class and individual sporting team subclasses works. If you completed Exercise 4, provide a reference in your project to the DLLs
Include unique characteristics about the sport. For example, for a sporting team such as a tennis team, the field location and/or the person to contact to restring rackets may be of interest.Be sure
Select two types of sporting teams and define subclasses for them. If you are using Visual Studio to develop your solution, use the class library template. These classes should inherit from a base
Create a base class to hold information about sporting teams on campus.If you are using Visual Studio to develop your solution, use the class library template. Design the base class so that it is not
Create a base class to store characteristics about a loan. Include customer details in the Loan base class such as name, loan number, and amount of loan. Define subclasses of auto loan and home loan.
Create a ticket reservation class for issuing tickets to on-campus events such as plays, musicals, and home basketball games. Design the ticket class so that it cannot be instantiated. Create
Define the heading for a generic method ProcessData that has one generic parameter as part of its signature.
Provide new implementation details in the HourlyEmployee class for the method you defined in the preceding question (28).
Create a method in the Employee class to determine the pay amount.It should be capable of being overridden in subclasses.
Define a constructor for HourlyEmployee that sends the employee number to the Employee class when an object is instantiated. Are there any changes needed in the Employee class? If so, what?
Define a subclass named HourlyEmployee with additional members of hours and payrate.
Define a more useful constructor that could be used to instantiate objects of the class.
Define a default constructor for Employee.
Define a read-only property for the pay data member.
How does an abstract class differ from an interface?public class Employee{private int empNumber;private decimal pay;}Given the above program segment, answer Questions 23 through 30.
Explain the difference between an overloaded and an overridden method. Give an example of each.
A multitier application would probably have:a. a class defined to interact with the userb. one or more classes defined to handle the business logicc. a class defined to deal with the datad. a client
The feature that enables you to split source code between two or more files is:a. genericsb. base classc. dynamic link libraryd. partial classese. package
_____ allows a method of a class to be called without regard to what specific implementation it provides.a. Polymorphismb. Abstractionc. Assembliesd. Versioninge. Class libraries
Interfaces can include:a. data membersb. abstract methodsc. nonabstract methodsd. propertiese. all of the above
Abstract classes can include:a. data membersb. abstract methodsc. nonabstract methodsd. propertiese. all of the above
Classes can extend or derive from ______________ class(es) and implement ______________ interface(s).a. one, oneb. many, onec. many, manyd. one, manye. one, twelve
A class from which an object cannot be instantiated could be a(n):a. base classb. derived classc. implemented classd. virtual classe. abstract class
To avoid having to use fully qualified referenced classes, you could:a. Add a reference to the class.b. Add an import statement for the class.c. Add a using directive.d. Inherit from the class.e.
The one constraint for having a solution include code from more than one programming language is the requirement that:a. Each project must consist of code in one language only.b. Each project must
In .NET, applications are deployed in terms of:a. .dll’sb. .exe’sc. solutionsd. assembliese. applications
To enable derived classes to override methods defined in a base class, methods of the base class should be defined using a(an) ______________ keyword:a. virtualb. overridec. staticd. publice. none of
Constructors are normally defined with a ______________ access modifier; data members with a ______________ access modifier; and properties with a ______________ access modifier.a. public, public,
If you want to keep classes that instantiate objects of a class from changing their data members, but enable derived classes to change base class data members, the data members in the base class
Using the following declaration, which of the following statements is true?public class aClass : bClass, IClassa. IClass is an interface.b. aClass is the derived class.c. bClass is the base class.d.
In C#, the super class, or base class of all others, is:a. superb. basec. valued. classe. object
The “is a” relationship is associated with:a. inheritanceb. interfacesc. polymorphismd. encapsulatione. all of the above
Polymorphism is useful in languages because it facilitates ______________ methods:a. overridingb. overloadingc. overstrikingd. interfacinge. inheriting
Components are normally compiled and stored with a file extension of:a. .exeb. .snoc. .projd. .dlle. .csc
To be considered a true object-oriented language, designers of the language must provide support for:a. propertiesb. objectsc. inheritanced. IDEse. command-line tools
Packaging data attributes and behaviors into a single unit so that the implementation details can be hidden describes an object-oriented feature called:a. abstractionb. inheritancec. objectsd.
What output is produced by the following code?int i;int [ ] anArray = new int [5];for (i = 0; i < anArray.Length; i++)anArray[i] = 2 * i;for (i = 0; i < anArray.Length; i++)Write(anArray[i] + " ");a.
Using the above declarations, use a member of the Array class to locate the index in the bArray array where 14 is stored.
Using the above declarations, use a member of the Array class to order the values in the bArray array in ascending order.
Using the above declarations, use a member of the Array class to change the order of the elements in the bArray array. The contents of the first cell should hold what was in the last cell. The second
Create array declarations for the following problem specifications.a. An array to hold the names of five font strings. Initialize the array with your favorites.b. An array to hold 12 state names.
Explain the difference between the pass by reference and pass by value.When an array is sent to a method, which one is used?
Showing 400 - 500
of 5434
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last