Assume the central government wants to develop a GUI application to survey and estimate the awareness of the schemes among the people of India and promote the scheme which is least popular.
Construct a GUI to get the Aadhar card number from the citizen in a text box with a label. In addition to that add 3 labels such as Aathmanirbhar, Digital India and Ujala Yojna and add one combo box against each label (3 labels and 3 combo boxes). Each combo box consists of the same three entities as “Self-Reliant”, “Digital Empowerment” and “Energy Efficient Scheme”. The user has to select an entity from the combo box for the name of the scheme given in the label. If the selected item matches with the scheme as given below:
- Aathmanirbhar - Self-Reliant
- Digital India - Digital Empowerment
- Ujala Yojna - Energy Efficient Scheme
The score will be assigned with ‘one’ else ‘zero’ for the specific scheme to the individual participant. By clicking the submit button, it has to display the total score for each scheme in the text boxes with a label as scheme name. The scheme with the least score has to be promoted.
Build a class named citizenOfIndia consists of aadharCardNo and scheme1Score,
scheme2Score, scheme3score as members.
Create a class named as SurveyOfIndia which is going to add the objects with the above-said information in an ArrayList. This class also contains methods as given below.
schemeScore():
When an individual selects an entity from the combo box for each scheme, then it has to call this method. This method verifies whether the entity selected for the scheme matches or not. If it matches the corresponding scheme score attribute has to be set with one else set with zero.
aggregateScore():
This method will be called when the submit button is pressed. The functionality of this method is to traverse over the array list and add the score for the individual scheme.
Find the total score for each scheme and display it in the corresponding text box
0 Answer(s)