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
Given the following statement, what would be the best heading for the DetermineAnswer( ) method?int aValue, result;result = DetermineAnswer(27.83, aValue);a. public void DetermineAnswer(27.83,
Which of the following would be the most appropriate way to invoke the predefined Floor( ) method found in the Math class?public static double Floor (double)a. answer = Floor(87.2);b. answer =
Which of the following identifiers follows the standard naming convention for a method?a. Calculate Final Gradeb. MilesPerGallonc. InValueMethodd. PrintReporte. Method1
Which of the following modifiers is the most restrictive?a. privateb. staticc. publicd. internale. protected
Which of the following is placed in a method heading to indicate that no value will be returned?a. publicb. staticc. argumentsd. voide. return
Functions or modules found in other languages are similar to in C#.a. modifiersb. parametersc. argumentsd. methodse. classes
In countries using the metric system, many products are sold by grams and kilograms as opposed to pounds and ounces. Write an application that converts grams to pounds and will display the price of
Write a program that computes the amount of money the computer club will receive from the proceeds of their granola project. Each case has 100 bars. The granola bars sell for $1.50 per bar. Each case
Write a program that computes a weighted average giving the following weights.Homework: 10%Projects: 35%Quizzes: 10%Exams: 30%Final Exam: 15%Do a compile-time initialization with the following
Write a program that prints the number of quarters, dimes, nickels, and pennies that a customer should get back as change. Run your program once by performing a compile-time initialization using 92
Write a program that computes the average of five exam scores. Declare and perform a compile-time initialization with the five values. Use a constant to define the number of scores. Print all scores
Write a program that calculates and prints the take-home pay for a commissioned sales employee. Perform a compile-time initialization and store the name of Nesbith Lang in a variable called
Write a program that shows the formatted retail price of items when there is a 15% markup. Test the program by performing a compile-time initialization with Ruggy Shoes, which has a wholesale price
Write a program that converts a temperature given in Celsius to Fahrenheit.Test the program by performing a compile-time initialization of 32 for the original Celsius value. Display the original
Write a program that converts a mile into its equivalent metric kilometer measurement. Test the program by performing a compile-time initialization of 10 for the miles value. Display the original
Design an application that converts miles to feet. Declare and initialize miles to 4.5. Show your miles formatted with two positions to the right of the decimal.Feet and inches should both be shown
The following program has several syntax errors as well as style inconsistencies.Correct the syntax errors and identify the style violations.namespace Chapter2{class converter{static void main({CONST
Explain how type, class, and object are related to a string.
Explain how a variable differs from a constant.
What will be the output from each of the following statements?a. Console.Write(‘‘Result is {0:c}’’, 67);b. Console.Write(‘‘Number {0:f 0} is {1:c}’’, 1, 3);c. Console.Write(‘‘{0:f
Suppose x, y, and z are double variables and x = 2.5, y = 6.9, and z = 10.0.What will be in the memory locations of each of the variables after each of the following statements is executed? (For each
Suppose x, y, and z are int variables and x = 2, y = 6, and z = 10.What will be in the memory locations of each of the variables after each of the following statements is executed? (For each
For each of the following declarations, write an appropriate compile-time initialization.a. counter for the number of correct responses begins with zerob. amount of money you owe on a credit card is
For each of the following, declare a variable using the best choice for data type.a. a counter for the number of correct responsesb. the amount of money you owe on a credit cardc. the name of your
Which of the following are valid identifiers? If they are invalid, indicate why.a. intValueb. value#1c. the first valued. _value1e. AVALUE
Indicate the order of operations for the following assignment statements by placing a number under the assignment operator, as illustrated in Figure 2-13.a. ans = value1 + value2 value3 – (value4
Which of the following formats 86 to display with two digits to the right of the decimal?a. {0:C}b. {0:c}c. {0:f2}d. all of the abovee. none of the above
What is stored in ans as a result of the arithmetic expression, given the following declarations?int ans = 10, v1 = 5, v2 = 7, v3 = 18;ans += v1 + 10 (v2 / 5) + v3 / v2;a. 18b. 32c. 28d. 30e.
What is stored in ans as a result of the arithmetic expression, given the following declarations?int ans = 0, v1 = 10, v2 = 19;ans = v2 % v1++;a. 1.8b. 9c. 8d. 2e. none of the above
Which statement increases the result by 15?a. 15 += result;b. 15 =+ result;c. result =+ 15;d. result += 15;e. result = 15 +;
Adding the keyword const to a declaration:a. places a value in memory that cannot be changedb. declares variables of the constant typec. must be done by placing it after the identifier in the
What would be an appropriate declaration for a memory location to be used as a flag to indicate whether a value has reached its upper limit?a. int upperLimit;b. upperLimit reached;c. bool
An object of the int class is:a. 47.98b. 47c. int classd. type objecte. type integral
Types are implemented in C# using:a. classesb. typesc. objectsd. namespacese. programs
Which of the following is a valid declaration for a variable to store the name of this textbook?a. string name of book;b. char nameOfBook;c. boolean nameOfBook;d. string bookName;e. char book Name;
One of primary differences between float, double, and decimal is:a. float is used to represent more significant digits.b. double is normally used with large monetary values.c. decimal is not used to
Which of the following is a reserved keyword?a. Consoleb. datac. intd. Systeme. all of the above
The character that cannot be used with an identifier is:a. –b. $c. d. #e. all of the above
Which of the following is a reference type?a. intb. boolc. stringd. decimale. integral
The number 768 is an example of a type.a. boolb. integralc. floating-pointd. structe. decimal
Which of the following is a valid identifier?a. namespaceb. variable 1c. exampleOfaValued. 3valuee. value#1
Two fuel stops, Canadian Fuel and American Fuel, are positioned near the U.S. Canadian border. At the Canadian station, gas is sold by the liter. On the American side, it is sold by the gallon. Write
Design a solution that prints the amount of profit an organization receives based on it sales. The more sales documented, the larger the profit ratio. Allow the user to input the total sales figure
Create an application with four classes. Three of the classes should contain data and behavior characteristics for circle, rectangle, and cylinder.You could extend your solution to problem number 6
Create a Month class that has a single data member of month number.Include a member method that returns the name of the month and another method that returns the number of days in the month.The
Write an application that computes the area of a circle, rectangle, and cylinder. Display a menu showing the three options. Allow users to input which figure they want to see calculated. Based on the
A large Internet merchandise provider determines its shipping charges based on the number of items purchased. As the number increases, the shipping charges proportionally decrease. This is done to
Write a program that calculates the take-home pay for an employee.The two types of employees are salaried and hourly. Allow the user to input the employee’s first and last name, id, and type. If an
Write a two-class solution to calculate and display a person’s body mass index (BMI). BMI is an internationally used measure of obesity.Depending on where you live, the Imperial BMI formula or the
Ever heard of acid rain? This is rainfall with a very low pH. Write an application that will enable you to display the pH level for a swimming pool and whether an additive is needed or not. The pH is
Write a program that takes a decimal value between 1 and 10 and displays its equivalent Roman numeral value. Display an error message if the value entered is outside of the acceptable range. Write a
Write conditional expressions to perform the following tests:a. When amountOwed is greater than 1000.00, display an overdue message.b. When amountOfRain is greater than 5 inches, add 5 to total.When
Rewrite the following compound expression as a nested if statement:if ((aValue > bValue) && (bValue == 10))WriteLine("Test complete");
Rewrite the following switch statement as a nested if statement using a series of else. . .if statements:string birdName;switch (birdName){case "Pelican":WriteLine("Lives near water.");break;case
Could a switch statement be designed logically to perform the same tests as the following nested if statement? If so, explain how it could be done.if (aValue == 100)WriteLine("Value is 100");else if
Assuming a is 5, b is 6, and c is 8, which of the following is (are) false?a. a == 5;b. 7 = 0;g. a
The string data type can be used:a. as an operand for the == or !=b. as an expression in the switch statement to be evaluatedc. as an operand for the > or < operatord. a and b are correcte. all of
Which of the following statements about logical operators is correct?a. Logical AND yields true if and only if both of its operands are either true or false.b. Logical OR yields true if either or
Given the switch statement, which of the following would be the first if statement to replace the first test in the switch?switch (control){case 11 :WriteLine("eleven");break;case 12
What is the result of the following conditional expression when aValue = 100 and bValue = 7?result = aValue > bvalue + 100 ? 1000 : 2000;a. 0b. 1000c. 2000d. 7e. none of the above
Given the following segment of code, what will be the output?int x = 5;if (x == 2)Write("Brown, brown, run aground. ");else Write("Blue, blue, sail on through. ");Write("Green, green, nice and
If you intend to place a block of statements within an if statement, you must use around the block.a. parenthesesb. square bracketsc. quotation marksd. curly bracese. none of the above
After execution of the following code, what will be the value of inputValue?int inputValue = 0;if (inputValue > 5)inputValue += 5;else if (inputValue > 2)inputValue += 10;else inputValue += 15;a.
Consider the following if statement, which is syntactically correct, but uses poor style and indentation:if (x >= y) if (y > 0) x = x * y; else if (y < 4) x = x − y;Assume that x and y are int
Examine the code. When will C be assigned 3? (Be careful.)if (A == B);C = 3;a. when A is equal to Bb. when A is not equal to Bc. neverd. every time the program is executede. not enough information is
Which logical operator (op) is defined by the following table? (T and F denote true and false.)a. NOTb. ANDc. ORd. not enough information is givene. none of the above Pop Q T PETEE Q T F F F T F F FF
What does the following program segment display? = int f 7, s = 15; f = s % 2; if (f!= 1) { f = 0; } s = 0; S= else if (f == 2) f = 10; { s = 10; } else { f = 1; s = 1; } = WriteLine (" a. 7 15 b. 0
Incorrect use of spacing with an if statement:a. detracts from its readabilityb. causes a syntax error messagec. can change the program logicd. causes a logic error messagee. all of the above
The symbol (=) is:a. the operator used to test for equalityb. used for comparing two itemsc. used as part of an assignment statementd. considered a logical compound operatore. all of the above
The _____ operator represents the logical AND.a. ++b. ||c. &&d. @e. none of the above
What will be displayed from executing the following segment of code?You may assume testScore has a value of 90.int testScore;if (testScore < 60); // Note the semicolon.Write("You failed the test!
Which statement in C# allows you to do the following: Properly check the variable code to determine whether it contains the character C, and if it does, display “This is a check” and then advance
What is displayed when the following code executes?score = 0;if (score > 95)Write("Congratulations! ");Write("That's a high score! ");Write("This is a test question!");a. This is a test question!b.
What is the output for total after the following segment of code executes?int num = 3, total = 0;switch (num){case 1:case 2:total = 5;break;case 3:total = 10;break;case 4:total = total + 3;break;case
Which expression is evaluated first in the following statement?if (a > b && c == d || a == 10 && b > a * b)?a. a * bb. b && cc. d || ad. a > be. none of the above
The result of the expression if (aValue == bValue) is:a. aValueb. 10c. an integer valued. true or falsee. determined by an input statement
Create a Money class that has as data members dollars and cents.Include IncrementMoney and DecrementMoney instance methods.Include constructors that enable the Money class to be instantiated with a
Write a program that creates a ProfessorRating class consisting of professor name, professor ID, and three ratings. The three ratings are used to evaluate easiness, helpfulness, and clarity. Include
Write a program that includes an Employee class that can be used to calculate and print the take-home pay for a commissioned sales employee. All employees receive 7% of the total sales. Federal tax
There are a number of national and state parks available to tourists. Create a Park class. Include data members such as name of park, location, type of (i.e., national, state, and local) facility,
Create a Trip class. Include as data members destination, distance traveled, total cost of gasoline, and number of gallons consumed.Include appropriate constructors and properties. Add additional
Create a Receipt class that could be used by a retail store. Items to include as data members are receipt number, date of purchase, customer number, customer name and address, customer phone number,
Create an Employee class. Items to include as data members are employee number, first name, last name, date of hire, job description, department, and monthly salary. The class is often used to
Create a Motorway class that can be used as extra documentation with directions. Include data members such as name of the highway, type of street (i.e., Road, Street, Avenue, Blvd., Lane, etc.),
Create a class representing a student. Include characteristics such as student number, first and last name, classification, and major. Write at least two constructors. Include properties for each of
Create a Date class with integer data members for year, month, and day. Also include a string data member for the name of the month.Include a method that returns the month name (as a string) as part
The following program has several syntax errors as well as style inconsistencies.Correct the syntax errors and identify the style violations. public class Chair { private string type; private double
Explain the role of the constructor. What is the default constructor?When do you automatically get a default constructor?
What does it mean to override a method? Why should the ToString( )method be overridden for user-defined classes?
Explain how instance methods differ from class methods. What differs when you want to invoke each different type? Which one requires an object in order for it to be called?
Given the following code snippet:Identify the following items by line number:a. method headingsb. property identifierc. default constructorsd. formal parameterse. local variables public class Camera
In order to provide a new definition for the ToString( ) method, what keyword is added to the method heading?a. staticb. overridec. newd. overloade. public
For a class called Account that has data members of accountNumber, balance, and transactionAmount, which would be the most appropriate instance method heading for a method that reduces the
Normally, member data uses a _____ access modifier, and methods use a _____ access modifier for object-oriented solutions.a. protected, publicb. private, protectedc. public, protectedd. public,
Which of the following modifiers in C# is used with constructors?a. constb. privatec. publicd. statice. protected
With a UML class diagrama. the name of the class appears at the bottom section of the diagramb. data members show a + to indicate public accessc. methods are not shownd. objects of the class appear
Given the following class definition, what would be a valid heading for a mutator?public class Student{private string name;private double gpa;}a. public double SetGpa(double gpaValue)b. public void
Which of the following would be a valid call to the default constructor for the following class?public class Employee {a. Employee employee1 = new Employee( );b. Employee employee1 = new undergrad(
If you follow the standard C# naming conventions, the property name for the following instance variable would be:private string name;a. propertyNameb. namePropertyc. getNamed. namee. Name
The following is probably an example of a(n):public double GetYards( )a. constructorb. mutatorc. propertyd. accessore. class definition
Showing 100 - 200
of 5434
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Last