100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached
logo-home
COMM 205 Midterm Concordia University trial exam solution $12.49   Add to cart

Exam (elaborations)

COMM 205 Midterm Concordia University trial exam solution

 2 views  0 purchase
  • Course
  • Institution

COMM 205 Midterm Concordia University trial exam solution

Preview 2 out of 10  pages

  • February 12, 2024
  • 10
  • 2023/2024
  • Exam (elaborations)
  • Questions & answers
  • Unknown
avatar-seller
COMM 205 Midterm Concordia University trial exam solution
1. A company purchases notebook and tablet computers for its operations for set prices.
Notebooks cost $1,100 and the tablets cost $450. Write a code fragment that takes the
number of notebooks and tablets as inputs and computes the total cost. The inputs are
provided through the textboxes txtNotebooks and txtTablets. The output should be displayed
in lblTotal. (10 points)

double txtNotebooks, txtTablets, total;

txtNotebooks = 1100;
txtTablets 450;

lblTotal.Text = total.ToString();

2. decimal a = 10m;
double b = a;
The above code has a problem. To correct it you need to usea.
Try-catch
b.
TryParse()
c.
Math class
d.
Casting


3. Which of the following conditions checks if price is between $10 and $20 inclusivelya.
price >= 10 || price <=20;
b.
price >= 10 && price <=20;
c.
20 >= price >= 10;
d.
10 <= price <= 20;

, The switch statement has the following structure:
switch (test variable or expression)
{
case value_1: …
case value_2: …
}
The valid types of test variable (or expression) include all of the
following, except:



a.
string
b.
double
c.
char
d.
int


If quantity has a value of 5, what is the value of discount after these statements are
executed?
switch (quantity) {
case 1: discount = 0; break;
case 2:
case 3:
discount = .1; break;
default:
discount = .2; break;
}

The benefits of buying summaries with Stuvia:

Guaranteed quality through customer reviews

Guaranteed quality through customer reviews

Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.

Quick and easy check-out

Quick and easy check-out

You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.

Focus on what matters

Focus on what matters

Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!

Frequently asked questions

What do I get when I buy this document?

You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.

Satisfaction guarantee: how does it work?

Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.

Who am I buying these notes from?

Stuvia is a marketplace, so you are not buying this document from us, but from seller smartzone. Stuvia facilitates payment to the seller.

Will I be stuck with a subscription?

No, you only buy these notes for $12.49. You're not tied to anything after your purchase.

Can Stuvia be trusted?

4.6 stars on Google & Trustpilot (+1000 reviews)

77764 documents were sold in the last 30 days

Founded in 2010, the go-to place to buy study notes for 14 years now

Start selling
$12.49
  • (0)
  Add to cart