Q21. ABN Shipment Corporation imposes charges to customers for different products. The shipment company costs for an order in two forms: Wholesalers and Retailers. The cost is calculated on unit basis as follows:
|For Units||Price for Wholesaler||Price for Retailers|
|1-15||Rs 50/-||Rs 60/-|
|16-20||Rs 45/-||Rs 55/-|
|21-30||Rs 40/-||Rs 50/-|
|31-50||Rs 35/-||Rs 45/-|
|>50||Rs 30/-||Rs 40/-|
- Write the code to disable the text boxes txtTotal and txtDisc and Wholesaler as default option when the form is active.
- Write the code for Calculate Amount Button to
- Display the discounted price in txtDisc if Special customer is selected.
- Display Net Amount.(Total cost=order unit * per unit price)
- Write the code for clear and Exit Button to
- Clear all Text Field and select wholesaler as default and uncheck special customer if is it.
Q22. Mr. Vidyarthi works in Blossoms Public School as a programmer. He is required to develop a student record. The school offers two different streams: medical and non-medical, with different grading criteria. The school also offers incentive to the NCC cadets in the form of a 3% increment in percentage for all the NCC cadets. The grading criterion for the two streams is given below:
- jRadioButton1 : Medical(OptMed) with buttonGroup1.
- jRadioButton2 : Non-Medical(OptNMed) with buttonGroup1.
- jCheckBox1 : NCC Cadet(chkNCC).
- Write the code to disable the text boxes for Percentage(txtPercentage) and Grade (txtGrade). Also, set Medical as default stream.
- Write the code for Calculate Percentage button to calculate the percentage after finding the total marks of first term and second term (assuming that both marks are out of 100). Also ensure that NCC cadets (chkNCC) get an increment of 3% in their percentages.
- Write the code for Calculate Grade button to calculate the grade depending on the stream selected according to the criteria given above.
- Write the code for Exit Button and Clear button to Clear all the text boxes and the check box and Medical as default stream.
Q23. Mr. Sharma of ICICI Bank frequently needs to calculate the interest and amount due for his clients. He asks his software programmer to design an interest calculator which will calculate the compound interest and amount due. The bank offer two different accounts fixed deposit and recurring deposit with different rate criteria. The programmer uses Java language with NetBeans IDE to develop this:
- jRadioButton1 : Fixed Deposit(optFD) with buttonGroup1.
- jRadioButton2 : Recurring Deposit(optRD) with buttonGroup1.
- Write the code to disable the text boxes Interest(txtInterest),Amount(txtAmount), Rate(txtRate) in the form when the form activated.
- Write the code for Exit and Clear Button to clear all the text boxes and check box. Set the default choice in the option button as Fixed Deposit.
- Write the code for Calculate button to calculate compound interest and amount and display the values in text boxes: txtInterest and txtAmount depending on the principal, rate and time.
|Fixed Deposit||<=1||10 %|
|>1 and <=5||12 %|
|Recurring Deposit||<=2||10 %|
|>2 and <=7||12 %|