cs201 GBD no 1 solution
#1
Question:
Suppose you are required to write a C/C++ program for a bank in which all transactions of a day will be compared. Keep in mind a huge volume of transactions per day:
Your code should have following features:


The processing speed must be high.

The logic of the program must be simple.

Which decision structure (if-else and switch statement) would you choose to achieve above mentioned features of code, and also mention reasons in favor of your choice.

[Note: Answer must be comprehensive with logical reasoning. Confine your answer within 3 to 5 lines]

Help me in cs201 GDB no: 1
#2
(01-06-2018, 10:35 AM)fahadmukhtar Wrote: Question:
Suppose you are required to write a C/C++ program for a bank in which all transactions of a day will be compared. Keep in mind a huge volume of transactions per day:
Your code should have following features:


The processing speed must be high.

The logic of the program must be simple.

Which decision structure (if-else and switch statement) would you choose to achieve above mentioned features of code, and also mention reasons in favor of your choice.

[Note: Answer must be comprehensive with logical reasoning. Confine your answer within 3 to 5 lines]

If-else decision structure should be used for the given required features and scenario, because overhead of switch statements is very high and as the number of transactions per day are huge, using switch statements will slow down the process considerably and the system will lag, hence the best option would be the use if-else decision structure as it will be faster and the logic of the system will also remain simpler.
  


Possibly Related Threads...
Thread Author Replies Views Last Post
  CS201 GDB Solution 2017 Rubaisha(Moody Girl) 3 965 01-10-2018, 10:16 AM
Last Post: fahadmukhtar
  CS201 Assignment 2 Solution Fall 2017 Admin 0 281 11-22-2017, 09:09 PM
Last Post: Admin
  CS201 VIVA Questions and Answers Pakistani 1 2,985 02-06-2017, 05:26 PM
Last Post: Admin
  CS201 All Current Final Term Papers 20 August 2016 to 02 September 2016 Rubaisha(Moody Girl) 0 843 08-20-2016, 12:56 PM
Last Post: Rubaisha(Moody Girl)
  CS201 Assignment#2 Solution by Aly Hamza Aly Hamza 0 1,694 06-23-2016, 02:55 PM
Last Post: Aly Hamza
  CS201 Spring 2016 Assignment #1 Solution Aly Hamza 2 1,736 05-11-2016, 10:18 AM
Last Post: Rubaisha(Moody Girl)



Users browsing this thread:
1 Guest(s)