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 Assignment 3 Solution Spring 2018 Pakistani 0 1,252 07-24-2018, 08:27 PM
Last Post: Pakistani
  CS201 Assignment 2 Solution Spring 2018 Admin 4 4,110 05-28-2018, 02:36 PM
Last Post: Pakistani
  Assignment Solution CS201 Spring 2018 Syra Younas 3 1,992 05-07-2018, 09:46 PM
Last Post: Admin
  Cs201 Syra Younas 2 1,529 05-05-2018, 11:01 AM
Last Post: Muhammad Yaseen
  CS201 GDB Solution 2017 Rubaisha(Moody Girl) 3 2,115 01-10-2018, 10:16 AM
Last Post: fahadmukhtar
  CS201 Assignment 2 Solution Fall 2017 Admin 0 1,270 11-22-2017, 09:09 PM
Last Post: Admin
  CS201 VIVA Questions and Answers Pakistani 1 7,421 02-06-2017, 05:26 PM
Last Post: Admin
  CS201 Assignment#2 Solution by Aly Hamza Aly Hamza 0 2,592 06-23-2016, 02:55 PM
Last Post: Aly Hamza
  CS201 Spring 2016 Assignment #1 Solution Aly Hamza 2 2,624 05-11-2016, 10:18 AM
Last Post: Rubaisha(Moody Girl)



Users browsing this thread:
1 Guest(s)