Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

"Multimedia in Business" Please respond to the following: Review the main states of the JApplet life cycle And give your opinion on the main state...

"Multimedia in Business"  Please respond to the following:

  • Review the main states of the JApplet life cycle And give your opinion on the main state that you believe consumes the most resources (e.g., CPU time, memory, network bandwidth, etc.) Provide a rationale to support your response.
  • Compare and contrast the key similarities and differences between the creation of a Java applet and the creation of a regular Java application. Next, suppose a client asked you to implement a business function using Java. Decide if you would implement the business functionality using a Java applet or a Java application. Justify your response.

This is one of the response for class student if you need to look Thanks

Professor & Classmates:

I'm not a huge fan of these books that are written by Joyce Farrell. The question is a bit confusing because you're asking the main state and give examples such as CPU time, memory, network bandwidth, etc.). There are four states to an applet which include:

The method that I say takes up the most would be the paint method because it's constantly running, and it must load it in memory. For an example, see below:

import java.awt.*;

import java.applet.Applet;

import java.awt.event.*;

/*<applet code="UpdateExample.class" width="350" height="150"> </applet>*/

public class UpdateExample extends Applet implements MouseListener

{

       private int mouseX, mouseY;

       private boolean mouseclicked = false;

       public void init()

       {

         setBackground(Color.black);

         addMouseListener(this);

       }

       public void mouseClicked(MouseEvent e)

       {

         mouseX=e.getX();

         mouseY=e.getY();

         mouseclicked = true;

         repaint();

       }

       public void mouseEntered(MouseEvent e){};

       public void mousePressed(MouseEvent e){};

       public void mouseReleased(MouseEvent e){};

       public void mouseExited(MouseEvent e){};

       public void update(Graphics g)

       {     

         paint(g);

       }

       public void paint( Graphics g)

       {

          String str;

          g.setColor(Color.white);

          if (mouseclicked)

          {

            str = "X="+ mouseX + "," + "Y=" + mouseY;

            g.drawString(str,mouseX,mouseY);

            mouseclicked = false;

          }

       }

}

When you're creating a Java applet, you have all these factors you must program whereas an application you don't. The Java application and applet are doing the same functions just one is written and the other isn't. I dislike the use of an Applet and I would go with the application. An applet is great if you're trying to do web based stuff but for business, I would highly recommend an application. Once again, if the business needs an app to be web based due to their model, then an applet would be better versus an application.

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question