logo

Crowdly

COM-306-1-SOFTWARE ENGINEERING-Spring 2025

Шукаєте відповіді та рішення тестів для COM-306-1-SOFTWARE ENGINEERING-Spring 2025? Перегляньте нашу велику колекцію перевірених відповідей для COM-306-1-SOFTWARE ENGINEERING-Spring 2025 в moodle.conncoll.edu.

Отримайте миттєвий доступ до точних відповідей та детальних пояснень для питань вашого курсу. Наша платформа, створена спільнотою, допомагає студентам досягати успіху!

The

refactoring method that moves code to its own method is called

0%
0%
100%
0%
0%
Переглянути це питання

You have

the following code:

return order.quantity * order.itemPrice -

      Math.max(0, order.quantity - 500) *

      order.itemPrice * 0.05 +

      Math.min(order.quantity * order.itemPrice * 0.1, 100);

You

refactor it so that it becomes:

const basePrice = order.quantity * order.itemPrice;

const quantityDiscount = Math.max(0, order.quantity - 500) * order.itemPrice * 0.05;

const shipping = Math.min(basePrice * 0.1, 100);

return basePrice - quantityDiscount + shipping;

What type of refactoring is this?

0%
0%
0%
100%
0%
Переглянути це питання

Select

all that are examples of direct personal identifying information

100%
0%
100%
0%
0%
100%
0%
0%
100%
Переглянути це питання

It is ok

to have conditional logic in a unit test

Переглянути це питання

Calculate

the Halstead volume of this piece of code

a = 1

b = a + 1

c = a + 2

d = c + a / b

b = b + d – c

0%
0%
100%
0%
0%
0%
Переглянути це питання

Penetration

testing

0%
100%
0%
0%
Переглянути це питання

A method

that encapsulates the creation of objects is called a/an

0%
0%
0%
100%
Переглянути це питання

In

testing, a piece of code that provides a simple replacement for a call to a

remote service is called a

0%
0%
0%
0%
100%
Переглянути це питання

You’ve written

an interface for a new API using good self-explanatory variable and method

names.  Does this require detailed

commenting?

100%
0%
Переглянути це питання

What is

the cyclomatic complexity of the following code?

def calculate_discount(price, is_member, season):

   discount = 0

   if price > 100:

      if is_member:

         if season == ‘summer’:

            discount = 0.2

         else:

            discount = 0.1

      else:

         if season == ‘winter:

            discount = 0.15

         else:

            discount = 0.05

   return price * (1 – discount)

0%
0%
0%
0%
0%
0%
100%
Переглянути це питання

Хочете миттєвий доступ до всіх перевірених відповідей на moodle.conncoll.edu?

Отримайте необмежений доступ до відповідей на екзаменаційні питання - встановіть розширення Crowdly зараз!