Create a problem to solve and write the program to solve it. Create a comments s
ID: 3770959 • Letter: C
Question
Create a problem to solve and write the program to solve it.
Create a comments section and include a written description of what the program does and instructions about how the program works.
Design a program that would meet the following criteria:
Descriptive Comments throughout the program
Selection Structure - must include either If/else logic or a case structure
Repetition Structure - must include either While, Do While or For loop
Array - Any type of an array
Inheritance - Use Inheritance and/or Interfaces
Exception - Use try…catch block
Components - Button, TextField, Label, or ComboBox
Theme - a clear and consistant theme
Design a JFrame Application that contains at least 4 of these 6 ;selection, loop, array, inheritance, components or exception using the problem created and the criteria mentioned above.
Explanation / Answer
/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package javaapplication26;
/**
*
* @author TANAY
*/
class myclass
{
public static int i;
public myclass()
{
System.out.println("HI");
}
}
public class JavaApplication26 extends myclass {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
int a[]={1,2,3,4,5};
for(i=1;i<11;i++)
{
if(1%2==0)
System.out.println(a[i]);
}
}
}
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.