Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Fahimah Khan   on May 23 In Java Category.

  
Question Answered By: Midissia Lopez   on May 23

I had to create  a Java Program just rently that created 5 instances of an object
that was designed to be customer orders. I don't want to give you an answer,
but I will be glad to guide you in a direction that may help.

First create a class  that sets up the actions that you want to perform. Second,
create a second class within the same package that references the first class
and all of the methods objects.

Make the methods in the first class empty constructors.

This is just one direction that you can go.

Have the second class contain the instance of the main method.

With this approach, you will have reusable code ie...The first class can be
referenced by any other class that chooses to do this.

This will get you started. Maybe someone else can add to this.

Share: 

 

This Question has 3 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on test a program? Or get search suggestion and latest updates.


Tagged: