Computer Science, asked by kk8393504, 5 hours ago

MCQ questions:
Q- abstraction is higher on:
a) upper-level module
b) non of the option is correct
c) lower-level module
d) at any level abstraction is high​

Answers

Answered by rishabhyadavir0102
2

The highest level of abstraction is the entire system. The next level would be a handful of components, and so on, while the lowest level could be millions of objects. See abstraction layer.

Answered by vinod04jangid
0

Answer:

C) lower-level module

Explanation:

High degree module is the interface / abstraction so as to be fed on at once with the aid of using the presentation layer. Low degree alternatively are bunch of small modules (subsystems) assist the excessive degree do their work. Example underneath is the excessive degree module. I actually have excluded the dependency constructor injection for shorter sample.

public class OrderService : IOrderService

{

   public void InsertOrder(Order ord)

   {

       if(orderValidator.IsValidOrder(ord)

       {

          orderRepository.InsertNew(ord);

           userNotification.Notify(ord);

       }

   }

}

And one of the low level module (the OrderValidator):

public class OrderValidator : IOrderValidator

{

   public bool IsValidOrder(Order ord)

   {

       if(ord == null)

           throw new NullArgumentException("Order is null");

       else if(string.IsNullOrEmpty(ord.CustomerId))

           throw new InvalidArgumentException("Customer is not set");

       else if(ord.Details == null || !ord.Details.Any())

           throw new InvalidArgumentException("Order detail is empty");

   }

}

How do you map an abstraction in software

https://brainly.in/question/16350329?msp_srt_exp=6

How do abstraction and encapsulation complement each other?

https://brainly.in/question/8164497

#spj3

Similar questions