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
visual c how program
Visual C# How to Program 6th edition Paul J. Deitel, Harvey Deitel - Solutions
Discuss a situation in which it would be more appropriate to use a do…while statement than a while statement. Explain why.
Compare and contrast the while and for iteration statements.
Describe the four basic elements of counter-controlled iteration.
Find the error(s) in each of the following code segments and explain how to correct it:a) i = 1;while (i <= 10);++i;}b) for (k = 0.1; k != 1.0; k += 0.1){Console.WriteLine(k);}c) switch (n){case 1:Console.WriteLine("The number is 1");case 2:Console.WriteLine("The number is
Write a C# statement or a set of C# statements to accomplish each of the following tasks:a) Sum the odd integers between 1 and 99, using a for statement. Assume that the integer variables sum and count have been declared.b) Calculate the value of 2.5 raised to the power of 3, using the Pow
State whether each of the following is true or false. If false, explain why.a) The default label is required in the switch selection statement.b) The break statement is required in every case of a switch statement.c) The expression ((x > y) && (a < b)) is true if either (x > y) is
Fill in the blanks in each of the following statements:a) Typically, _________statements are used for counter-controlled iteration and _________statements are used for sentinel-controlled iteration.b) The do…while statement tests the loop-continuation condition _________executing the loop’s
What is wrong with the following statement? Provide the correct statement to add 1 to the sum of x and y.Console.WriteLine(++(x + y));
Based on the dangling-else discussion in Exercise ANS: , modify the given code to produce the output shown in each part of the problem. Use proper indentation techniques. You must not make any additional changes other than inserting braces. We eliminated the indentation from the following code to
Based on the dangling-else discussion in Exercise ANS: , state the output for each of the following code snippets when x is 9 and y is 11 and when x is 11 and y is 9. We eliminated the indentation from the following code to make the problem more challenging.a) if (x < 10)if (y >
What does the following app display? // Ex. 5.26: Mystery3.cs 2 using System; 3 4 class Mystery3 5 { static void Main() int row - 10; int column; 10 while (row >= 1) { column II 12 13 1; 14 15 16 while (column
What does the following app display? // Ex. 5.25: Mystery2.cs using System; 3 2 class Mystery2 { static void Main() { int count = 1; 4 5 while (count
What does the following app display? // Ex. 5.16: Mystery.cs 2 using System; 3 4 class Mystery { static void Main() { int x = 1; int total 0; 10 while (x
Identify and correct the errors in each of the following pieces of code. [There may be more than one error in each piece of code.]a) if (age >= 65);{Console.WriteLine("Age greater than or equal to 65");}else{Console.WriteLine("Age is less than 65)";}b) int x = 1, total;while (x <= 10){total
What is the difference between the prefix increment operator and the postfix increment operator?
What type of iteration would be appropriate for calculating the sum of the first 100 positive integers? What type of iteration would be appropriate for calculating the sum of an arbitrary number of positive integers? Briefly describe how each of these tasks could be performed.
Describe the two ways in which control statements can be combined.
Explain what happens when a C# app attempts to divide one integer by another. What happens to the fractional part of the calculation? How can you avoid that outcome?
Compare and contrast the if single-selection statement and the while iteration statement. How are these two statements similar? How are they different?
What is wrong with the following while statement?while (z >= 0){sum += z;}
Identify and correct the errors in each of the following sets of code:a) while (c <= 5){product *= c;++c;b) if (gender == 1){Console.WriteLine("Woman");}else;{Console.WriteLine("Man");}
Determine the values of the variables in the following statement after it executes. Assume that when the statement begins executing, all variables are type int and have the value 5. product *= x++;
Combine the statements that you wrote in Exercise 5.5 into a C# app that calculates and displays the sum of the integers from 1 to 10. Use a while statement to loop through the calculation and increment statements. The loop should terminate when the value of x becomes 11.Data From Problem 5.5Write
Write a C# statement to accomplish each of the following tasks:a) Declare the int variable sum and initialize it to 0.b) Declare the int variable x and initialize it to 1.c) Add variable x to variable sum, and assign the result to variable sum.d) Display "The sum is: ", followed by the value of
Write C# statements to accomplish each of the following tasks:a) Assign the sum of x and y to z, and increment x by 1 with ++. Use only one statement and ensure that the original value of x is used in the statement.b) Test whether variable count is greater than 10. If it is, display "Count is
Write four different C# statements that each add 1 to int variable x.
State whether each of the following is true or false. If false, explain why.a) An algorithm is a procedure for solving a problem in terms of the actions to execute and the order in which these actions execute.b) A set of statements contained within a pair of parentheses is called a block.c) A
Fill in the blanks in each of the following statements:a) All apps can be written in terms of three types of control structures:____________ , ____________ and ____________.b) The ____________statement is used to execute one action when a condition is true and another when that condition is
Explain why a class might provide a property for an instance variable.
Explain the purpose of an instance variable.
What is a default constructor? How are an object’s instance variables initialized if a class has only a default constructor?
What is the purpose of operator new? Explain what happens when this keyword is used in an app.
Explain the purpose of a method parameter. What is the difference between a parameter and an argument?
What is the difference between a local variable and an instance variable?
State whether each of the following is true or false. If false, explain why.a) By convention, method names begin with a lowercase first letter and all subsequent words in the name begin with a capital first letter.b) A property’s get accessor enables a client to modify the value of the instance
Fill in the blanks in each of the following:a) The format specifier _______is used to display values in a monetary format.b) Every class declaration contains keyword _______ followed immediately by the class’s name.c) Operator _______ creates an object of the class specified to the right of the
What does the following code display?string s1 = "*";string s2 = "***";string s3 = "*****";Console.WriteLine($"{s1}\n{s2}\n{s3}");
What does the following code display?Console.Write("*");Console.WriteLine("***");Console.WriteLine("*****");Console.Write("****");Console.WriteLine("**");
What does the following code display?Console.Write("*");Console.Write("***");Console.Write("*****");Console.Write("****");Console.WriteLine("**");
Using the statements you wrote in Exercise 3.5, write a complete app that calculates and displays the product of three integers.Data From Problem 3.5Write declarations, statements or comments that accomplish each of the following tasks:a) State that an app will calculate the product of three
What does the following code display?Console.WriteLine("*");Console.WriteLine("***");Console.WriteLine("*****");Console.WriteLine("****");Console.WriteLine("**");
What does the following code display?Console.WriteLine("*\n**\n***\n****\n*****");
State whether each of the following is true or false. If false, explain why.a) C# operators are evaluated from left to right.b) The following are all valid variable names: _under_bar_, m928134, t5, j7, her_sales, his_account_total, a, b, c, z and z2.c) A valid C# arithmetic expression with no
In this chapter you learned the basics of classes. Now you’ll begin “fleshing out” aspects of a class called “Hybrid Vehicle.” Hybrid vehicles are becoming increasingly popular, because they often get much better mileage than purely gasoline-powered vehicles. Browse the web and study the
State the order of evaluation of the operators in each of the following C# statements and show the value of x after each statement is performed:a) x = 7 + 3 * 6 / 2 - 1;b) x = 2 % 2 + 2 * 2 - 2 / 2;c) x = (3 * 9 * (3 + (9 * 3 / (3))));
Given that y = ax3 + 7, which of the following are correct C# statements for this equation?a) y = a * x * x * x + 7;b) y = a * x * x * (x + 7);c) y = (a * x) * x * (x + 7);d) y = (a * x) * x * x + 7;e) y = a * (x * x * x) + 7;f) y = a * x * (x * x + 7);
Which of the following C# statements contain variables whose values are modified?a) p = i + j + k + 7;b) Console.WriteLine("variables whose values are modified");c) Console.WriteLine("a = 5");d) value = int.Parse(Console.ReadLine());
Assuming that x = 2 and y = 3, what does each of the following statements display?a) Console.WriteLine($"x = {x}");b) Console.WriteLine($"Value of {x} + {x} is {x + x}");c) Console.Write("x =");d) Console.WriteLine($"{x + y} = {y + x}");
Write C# statements that accomplish each of the following tasks:a) Display the message "Enter an integer: ", leaving the cursor on the same line.b) Assign the product of variables b and c to variable a.c) State that an app performs a simple payroll calculation (i.e., use text that helps to document
Fill in the blanks in each of the following statements:a) ___________are used to document an app and improve its readability.b) A decision can be made in a C# app with a(n) ___________.c) Calculations are normally performed by___________ statements.d) The arithmetic operators with the same
Write declarations, statements or comments that accomplish each of the following tasks:a) State that an app will calculate the product of three integers.b) Declare the variables x, y, z and result to be of type int.c) Prompt the user to enter the first integer.d) Read the first integer from the
Identify and correct the errors in each of the following statements:a) if (c < 7);{Console.WriteLine("c is less than 7");}b) if (c => 7){Console.WriteLine("c is equal to or greater than 7");}
Write statements to accomplish each of the following tasks:a) Declare variables c, thisIsAVariable, q76354 and number to be of type int.b) Prompt the user to enter an integer.c) Input an integer and assign the result to int variable value.d) If the variable number is not equal to 7, display "The
State whether each of the following is true or false. If false, explain why.a) Comments cause the computer to display the text after the // on the screen when the app executes.b) C# considers the variables number and NuMbEr to be identical.c) The remainder operator (%) can be used only with integer
Fill in the blanks in each of the following statements:a) A(n)________ begins the body of every method, and a(n)________ ends the body of every method.b) Most statements end with a(n)________.c) The ________statement is used to make decisions.d) ________begins a single-line comment.e) ________ ,
Briefly describe each of the following terms:a) Toolbarb) Menu barc) Toolboxd) Controle) Formf) Solution
Some features that appear throughout Visual Studio perform similar actions in different contexts. Explain and give examples of how the ellipsis buttons, down-arrow buttons and tool tips act in this manner. Why do you think the Visual Studio IDE was designed this way?
State whether each of the following is true or false. If false, explain why.a) You can add a control to a Form by double clicking its control icon in the Toolbox.b) The Form, Label and Picture Box have identical properties.c) If your machine is connected to the Internet, you can browse websites
Fill in the blanks in each of the following statements:a) When an ellipsis button is clicked, a(n)_______ is displayed.b) Using _______help immediately displays a relevant help article.c) GUI is an acronym for _______.d) The _______property specifies which image a PictureBox displays.e) The
State whether each of the following is true or false. If false, explain why.a) Χ toggles auto-hide for a window.b) The toolbar icons represent various menu commands.c) The toolbar contains icons that represent controls you can drag onto a Form.d) Both Forms and Labels have a title bar.e) Control
Fill in the blanks in each of the following statements:a) The technique of_______ allows you to create GUIs without writing any code.b) A(n) _______is a group of one or more projects that collectively form a Visual C# app.c) The _______feature hides a window in the IDE.d) A(n) _______appears when
Some people want to eliminate sexism in all forms of communication. You’ve been asked to create a program that can process a paragraph of text and replace gender-specific words with gender-neutral ones. Assuming that you’ve been given a list of gender-specific words and their gender-neutral
Besides the obvious benefits of reuse made possible by OOP, what do many organizations report as another key benefit of OOP?
How does the .NET Framework Class Library facilitate the development of .NET apps?
What is the key vision of Microsoft’s .NET initiative?
What is the key capability of the web?
What did the chief benefit of the early Internet prove to be?
What is the key accomplishment of the UML?
You are probably wearing on your wrist one of the world’s most common types of objects— a watch. Discuss how each of the following terms and concepts applies to the notion of a watch: object, attributes and behaviors.
What are the advantages to using object-oriented techniques?
What are the key benefits of the .NET Framework and the CLR? What are the drawbacks?
Expand each of the following acronyms:a) W3Cb) OOPc) CLRd) MSILe) UMLf) IDE
Translator programs, such as assemblers and compilers, convert programs from one language (referred to as the source language) to another language (referred to as the target language). Determine which of the following statements are true and which are false:a) An assembler translates
Categorize each of the following items as either hardware or software:a) CPUb) Compilerc) Input unitd) A word-processor programe) A C# program
Why is using cloud-computing resources sometimes preferable to purchasing all the hardware you need for your own computer?
What are operating systems?
What is the key advantage of using the new async feature in preference to using old-style multi threading?
What is a key advantage of interpreters over compilers? What is a key disadvantage?
State whether each of the following is true or false. If false, explain why.a) The smallest data item in a computer can assume the value 1 or the value 2. Such a data item is called a bit (short for “binary digit”—a digit that can assume either of two values).b) The Unicode character set is a
Fill in the blanks in each of the following statements:a) Although many different OOAD processes exist, a single graphical language for communicating the results of any OOAD process has come into wide use. This language, known as the __________, is now the most widely used graphical scheme for
Fill in the blanks in each of the following statements:a) The programs that run on a computer are referred to as ________.b) Systems such as smartphones, appliances, game controllers, cable set-top boxes and automobiles that contain small computers are called ________.c) Just as characters are
Describe the two-step translation process for preparing your C# code to execute on your particular computer.
Arrange these byte measurements in order from smallest to largest: terabyte, megabyte, petabyte, gigabyte and kilobyte.
State whether each of the following is true or false. If false, explain why.a) Software objects model both abstract and real-world things.b) The most popular database model is the relational database in which data is stored in simple tables. A table includes records and fields.c) A database is a
Fill in the blanks in each of the following statements:a) The __________executes .NET programs.b) The CLR provides various services to __________code, such as integrating software components written in different .NET languages, error handling between such components, enhanced security and
Fill in the blanks in each of the following statements:a) Objects, or more precisely the________ that objects come from, are essentially reusable software components.b) You send messages to an object. Each message is implemented as a method ________that tells a method of the object to perform its
Fill in the blanks in each of the following statements:a) Computers process data under the control of sequences of instructions called __________.b) A computer consists of various devices referred to as __________, such as the keyboard, screen, mouse, hard disks, memory, DVD drives and processing
Showing 100 - 200
of 187
1
2
Step by Step Answers