18
1. Read the following case study and answer the questions that follow : The YouWe event managers company is organizing a shopping festival in the SHOP TILL DROP Mall. The accounts manager is creating a software to calculate the discount during the shopping festival. Each customer is given a discount on the total amount spent (in all the shops) in the mall. The discount is given based on the credit card used. The following is the data entry screen at the mall: :

Ip Question Bank

Embed Size (px)

Citation preview

Page 1: Ip Question Bank

1. Read the following case study and answer the questions that follow :

The YouWe event managers company is organizing a shopping festival in the SHOP TILL DROP Mall. The accounts manager is creating a software to calculate the discount during the shopping festival. Each customer is given a discount on the total amount spent (in all the shops) in the mall. The discount is given based on the credit card used. The following is the data entry screen at the mall:

:

Page 2: Ip Question Bank

Q 2. Read the following case study and answer the questions that follow.

Manager of Bachat Bank has developed a form for finding EMI to be paid by customers against repayment of loan. Loan interest rates are(Yearly) –

Loan Type Interest Rate

Car Loan. 14.5 %

Personal Loan 13.25 %

Education Loan 11.75 %

Object Type Object Name Description

Form FrmEmiCalc Main Form

Combo Box cmbYears To select Years for Loan

Text Box

txtLoanAmt To enter loan amount

txtProcCharge To enter processing charge

txtRate To enter interest rate

txtEMI To display EMI payable

Option Button

optCar To select loan type as Car Loan

optPersonal To select loan type as Personal Loan

optEducation To select loan type as Education Loan

Command Button

cmdCalcEMI To calculate payable amount

cmdClear To clear the entered values

cmdExit To quit form application

Page 3: Ip Question Bank

a) Initially loan type should be set to Car Loan, TxtRate should be disabled and cmbYears should have values 5,10,15, and 20.

b) If loan amount is less than or eual to 0. It should display an error message “Invalid Amount” and cursor should point to txtLoanAmt.

c) When the user clicks the CmdCalcEMI button, the total payable EMI should be calculated and displayed in the txtEMI text box. To calculate EMI, firstly calculate compound interest using formula ci=p*(1+r/100)^t. Add compound interest to loan amount and divide by time (in months).

d) Write the code for CmdExit button to stop the application and CmdClear command button to clear all the text boxes, option buttons. Also cursor should point on txtLoanAmt test box.

Q-3 A School library has two categories of members: Students and Faculty Members. Students are issued books for a week whereas faculty members are issued books for 3 days. A fine of Rs. 6 and Rs. 10 per extra day is charged from students and faculty members respectively, if the book is returned after the due date. The interface for the application as given below:

Page 4: Ip Question Bank

Object Type Object Name Description

Form FrmLibrary Main Form

Text Box

textbook ID To enter book ID

txtIssuedOn To enter issue date

txtMemberID To enter member ID

txtReturnOn To enter return date of book

Option ButtonoptStudent

To Select Member typeoptFaculty

Command Button

cmdCalcFine To calculate fine

cmdClear To clear the entered values

cmdExit To close the application

a) Book ID and Member ID should be non-blank alphanumeric characters. 1

b) Text box TxtIssuedOn should be set to system date when the form loads and user should not allow changing it. 1

c) Ideal return date should be calculated according to the logic explained above and should be stored in the text box txtReturnOn. 3

d) When the user clicks the CmdCalcFine button, the fine amount should be displayed in a message box.3

e) Write the code for CmdClear command button to clear all the text boxes and set the default member type to student. Also write the code for CmdExit to close the application. 2

4. Read the following case study and answer the questions that follow.

Paradise Company is a dealer of goods. The company’s programmer has made the following from to calculate the total cost of the order of the customers. The total cost is calculated as per the following criteria.For Units                           Price For wholesalers                   Price for Retailers 1-30                                     Rs. 100/-                                       Rs. 80/- 31-70                                   Rs. 90/-                                         Rs. 70/- >70                                      Rs. 60/-                                         Rs. 50/-Special customers are given a discount of 20%.

Object Type Object Name Description

Page 5: Ip Question Bank

Form FrmParadise Main Form

Text Box

txtUnitOrdered To enter Unit Ordered

txtTotalCost To show calculated cost

Check Box chkSpCust To be checked if customer is special

Option Button

optWholesalerl

To Provide customer type

optRetailer

Command Button

cmdCalcCost To calculate total cost

cmdClear To clear the entered values

cmdQuit To close the application

f)(a) Write the commands to disable the text boxes txtUnitOrdered and txtTotalCost. 2(b)Write the code for text boxes txtUnitOrdered or txtTotalCost which accept only  numeric data. 2(c) Write the code for cmdCalcCost to calculate the total cost of the units on the type of      customer selected . Also ensure that Special Customers get a discount of 20%. 4 (d) Write the code for cmdClear command button to clear all the text boxes and check box. Also write the code for cmdQuit to close the application. 2

Q5. Read the following case study and answer the questions that follow.

Mr. Kapoor works in Fashion Textile as a programmer. He is required to develop an employee salary calculator. The company has two types of employee, regular and casual. The company also offers 10 % of their salary as an incentive to the entire employee if they do not take any leave during a month time. Also there is a bonus equal to one month salary to the regular employee in the month of January.

Object Type Object Name Description

Form FrmSalary Main Form

Page 6: Ip Question Bank

Text Box

textName To enter employee name

txtLeave To enter leaves taken by employee

txtIncentive To store incentive

txtMonthSalary To enter monthly salary

txtTotSalary To store total salary

Option ButtonoptRegular To select for regular employee

optCasual To select for casual employee

Command Button

cmdCalcInc To calculate incentive amount

cmdCalcSalary To calculate total salary

cmdClear To clear the entered values

cmdExit To close the application

a) Write the commands to disable the textboxes txtIncentive, txtTotSalary and set the focus on textbox txtName.

1

b) Write the code for cmdClear command button to clear all the text boxes and set the focus on cmdExit command button.

2

c) Write the code for cmdCalcInc to calculate the incentive of the employee and display it in txtIncentive depending on the leave records.

2

d) Write the code for cmdCalcSalary to calculate the total amount of salary in January month and display it in txtTotSalary on the basis of job type. Remember the bonus condition given in the beginning of a question for the regular employee. 3

e) Write the code for cmdExit to close the application, before closing the application it should display a message “Do you really want to close the program (yes/no)?”. If user select yes it

Page 7: Ip Question Bank

should close the program otherwise set the focus on textbox txtName. 2

Q6. Read the following case study and answer the questions that follow.

Manager of Bachat Bank has developed a form for finding EMI to be paid by customers against repayment of loan.

Loan interest rates are(Yearly) -

Loan Type Interest Rate

Car Loan. 14.5 %

Personal Loan 13.25 %

Education Loan 11.75 %

Object Type Object Name Description

Form FrmEmiCalc Main Form

Combo Box cmbYears To select Years for Loan

Text Box

txtLoanAmt To enter loan amount

txtProcCharge To enter processing charge

txtRate To enter interest rate

txtEMI To display EMI payable

Option Button

optCar To select loan type as Car Loan

optPersonal To select loan type as Personal Loan

optEducation To select loan type as Education Loan

Command Button

cmdCalcEMI To calculate payable amount

cmdClear To clear the entered values

cmdExit To quit form application

Page 8: Ip Question Bank

a) Initially loan type should be set to Car Loan, TxtRate should be disabled and cmbYears should have values 5,10,15, and 20.

b) If loan amount is less than or eual to 0. It should display an error message “Invalid Amount” and cursor should point to txtLoanAmt.

c) When the user clicks the CmdCalcEMI button, the total payable EMI should be calculated and displayed in the txtEMI text box. To calculate EMI, firstly calculate compound interest using formula ci=p*(1+r/100)^t. Add compound interest to loan amount and divide by time (in months).

d) Write the code for CmdExit button to stop the application and CmdClear command button to clear all the text boxes, option buttons. Also cursor should point on txtLoanAmt test box.

Q7. Read the following case study and answer the questions that follow. [10]

The FOR U SHOP has computerized its billing. A new bill is generated for each customer. The shop allows three different payment modes. The discount rate is based on the payment mode. The following is the data entry screen used to generate the bill:

Page 9: Ip Question Bank

Object Type Object Name Description

Form frmDiscount The main form

Text Box

TxtAmt To input total Shopping Amount

TxtDisc To display Discount Rate

TxtNet To display Net Price

Option Buttons

Optcash To select mode of payment as cash

Optcheque To select mode of payment as cheque

OptCredit To select mode of payment as credit card

Command Buttons

Cmdcalc To calculate discount and Net amount

Cmdclear To clear all textboxes

Cmdexit To exit from the application

(a) Write the code for the CmdClear command button to clear all the textboxes.

(b) Write the code for the form load event of FrmDiscount so as to

(i) Disable the TxtDisc and the Txtnet textboxes and set default choice in the option button as cash.

(ii) Set the focus to the textbox.

(c) Write the code for the change event of the TxtAmt textbox to ensure that the user does not enter a negative or zero value. If a negative or zero value is entered then the textbox should be made blank and warning message should be displayed.

(d) Write the code for code for Cmdexit to display the message “APPLICATION IS SHUTING DOWN” and exit from the application.

(e) Write the code for the CmdCalc command button to display the discount rate and net price in the TxtDisc and TxtNet textboxes respectively. Note that net price is calculated as shopping amount- discount amount. The discount amount is calculated according to the discount rate which is based on the payment mode and total shopping amount to the following table.

Payment Mode Shopping Amount Discount Rate

Cash <10000 20%

>=10000 25%

Cheque <15000 10%

>=15000 %15

Credit Card <10000 10%

>=10000 12%

Page 10: Ip Question Bank

Q8 ABC Industries computes yearly Income Tax of their Employees using the above interface. The general

features of the interface are as follows :

a. The net salary is computed as soon as any amount is entered in the text box for deduction (txtDeduction). The net salary is the difference between Gross Salary (txtGross) and the deduction. The same is visible in the text box txtNetSal. 2

b. The income tax is calculated by a VB function IncomeTax() that accepts the parameters netsal (long) and gender (integer) of the employee and returns the income tax which is displayed in a message box when ever the Calculate Income Tax Button (cmdTax) is clicked.

(eg: Mr/Ms <txtname> Your Income tax is Rs 2500). The limits and range for Income tax calculation is as follows:

Below 1,50,000 – Nil

1,50,000 to below 2,50,000 – 10% of Net Salary

2,50,000 and above – 20% of Net Salary

Special rebate for Ladies: Rs 5000 on Net Tax.

Write the codes under specific events for the above requirements. 4

c. Write a code for txtsalary_change so that user can enter only numeric value and greater than zero value in the textbox. 2

d. Write a code for form load event to disable the txtgross textbox and option button as male as default. 1

e. Write a code to clear the txtname textbox and txtsalary textbox. 1

Page 11: Ip Question Bank

9. Read the following case study and answer the questions that follow:

Home Decor Furnishing is a company that manufactures and sells various furnishing items in three qualities (Economy, Business and Elite) and three sizes (Kids, Adults and Giants). The cost of each furnishing item is calculated on basis of a Base Cost, which is the cost of the item in Business quality and Adults size. The cost is changed by – 10% and +20% in case of Economy and Elite quality respectively. Similarly the cost is changed by –5% and +15% in case of Kids and Giants sizes respectively. The interface for gathering users choice is as given below :

Add the following functionality to the interface:

(a) The combo box cmbquality must contain economic, Business and Luxury when the form loads in the memory and focus on text box txtitem. 2

(b) The combo boxes cmbquality and cmbsize should respectively be set to default values of Economy and Adults initially. 2

(c) When a user chooses a choice other than the default choices, the labels lblchangeforquality and lblchangeforsize should display the message.

‘Percent Increase / Decreases in cost ..% according to the logic explained above. 3

(d) When user clicks the Calculate button the final message should be displayed in the label lblyourchoice as indicated in the form image. 3

Q10. Read the following case study and answer the question that follow :

Bharti School has computerized its school Admission system for classes 6th to 8th. The following is the data entry screen used.

1.When the form load, the textboxes for attributes Marks, Total marks and result should be disabled. 1

2.When the user clicks clear button, all the values stored in text boxes and check boxes should be cleared. 2

3.Check that the Marks in test (txtmarks) entered are in the range 0 to 75. 2

Page 12: Ip Question Bank

4Marks in Attributes marks textbox automatically shows the marks when user click on any Attributes 3

5.When the command button with caption “find results” is clicked total marks and result are calculated, based on the criteria given below and displayed in appropriate text boxes. 2

*The criteria for calculation of attributes marks is as given below :

Neighbourhood Child 5 marks

Responsible Parents 10 marks

Parents are alumni 5 marks

Sibling of our student 5 marks

Total Marks is calculated as Attributes marks + Marks in Test.

If Total marks are above 80, display result as Selected otherwise display result Not selected

Page 13: Ip Question Bank

11. Read the following case study and answer the questions that follows

Mr. Vijay has designed a Visual Basic form to gather the data regarding the ranks and prize amounts won by different teams in am annual sports meet.

He has used different controls for storing the sports name, rank and the prize amount respectively. Now he wishes to make the following changes to the application he designed.

Object Object Name Description

Form

Label

FrmSports

Lblname

Lblparticapated

Lblrank

Lblprize

The main Form Object

Page 14: Ip Question Bank

Text Box

Check Box

Command Button

TxtTeamname

Txtrnkbasket

Txtrnkfootball

Txtrnkvolley

Txtprzhockey

Txtprzbasket

Txtprzfootball

Txtprzvolley

Txtprzhockey

Chkbasket

Chkfootball

Chkvolleyball

Chkhockey

Cmdcalculateprize

Cmdclear

To enter Team name

To enter rank

To enter rank

To enter rank

To enter rank

To enter prize

To enter prize

To enter prize

To enter prize

To calculate the prize.

To clear the text box and check box

(a) The team Name should be displayed in upper case and the text box for rank should be enabled only if the corresponding check box is checked. [3]

(b) The text box for prize amount should be enabled only if the corresponding check box is checked [2]

(c) The contents of the text box prize amount should be a non-negative number. [2]

(d) When the user clicks the command button Calculate Prize Amount, the total prize amount should be displayed in a message box. [2]

(e) When the user clicks the clear button, the form should be restored to the default state. [1]

Page 15: Ip Question Bank

Q.4 The following application is used to extract a sub string from an entered string depending up on two indices as shown. Write the codes under the action event of Button to get the answer.