Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Make an : Is for kids boolean method in eitem class Append the object details in items for kids list (if the object id for

image text in transcribed

Make an : Is for kids boolean method in eitem class

Append the object details in items for kids list (if the object id for kids then kids list will append else items will append)

Note: dont use min age in the if statement use is for kids method

the other code:

private void jComboBox1ActionPerformed(java.awt.event.ActionEvent evt) { // TODO add your handling code here: }

private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) { String name= jTextField4.getText(); double price= Double.parseDouble(jTextField5.getText()); int minUserAge= Integer.parseInt(jComboBox1.getSelectedItem().toString()); boolean batt=jCheckBox1.isSelected(); Eitem item= new Eitem(name, minUserAge, price, batt); jTextArea1.append(item.toString()+" "); if (item.isForKids()){ }

From the previous exercise, add a new boolean method "isForKids" in class "EItem" that return true if the minUserAge

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

SQL Server Query Performance Tuning

Authors: Sajal Dam, Grant Fritchey

4th Edition

1430267429, 9781430267423

More Books

Students also viewed these Databases questions