Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Java Expert


Home >> Java

Assignment

Your task in this assignment is to develop a Java program that can communicate with a real SMTP email server for sending emails. It should have a graphical user interface (GUI).

LEARNING GOALS

1.  To enhance the functionality of the program developed in Assignment 1 so that the program communicates with an SMTP server using TCP Sockets - i.e. to practise implementing networked applications. 

2.  To practise the development of a graphical user interface (GUI) and use of event handling in Java.

3.  To practise using the extensive Java libraries, e.g. for the TCP connection and the user interface development.

4.  To practise object-oriented development (structuring of program). 

PROGRAM DESCRIPTION

Your program must have the following parts: 

1.  An EmailSender object which receives an object of type Message (created in assignment 1) and sends it using a Socket connection to an SMTP server.

2.  The GUI must have: 

a. Text input fields for each required field, 

b.  a send button to send the email

c.  a clear (or restart) button to clear fields (to, from, subject, message etc)

d.  two text areas, 

i.  one to compose the email message and  ii.  A second to display server responses  

3.  A Logger class which makes a log entry whenever an email is sent or an unsuccessful attempt is made. The log entry is made in a file called 'emaillog.txt', which is in a subdirectory of the directory of the program. The subdirectory is called 'logs'. 

20/04/2011 17:45:55; 111111@swin.edu.au; 222222@swin.edu.au; "Coffee break"; status: success 111111@swin stands for the sender, 222222@swin. for the recipient, and "Coffee break" for  the subject line of the sent message.

4.  The code should be easy to read

 

PROGRAM USE CASE (FUNCTIONALITY)

1.  When the program is started (from command line using "java Test"), the user interface is shown. The sender field shows a default e-mail address.

2.  The user types the necessary data into the appropriate fields. The program validates the e-mail addresses. (The best time to do this is when the cursor leaves the field of an e-mail address.)

3.  When the user presses the Send button, the program creates a Message object and stores all the information in the fields of the user interface in the Message object. 

4.  The EmailSender receives the Message object and opens a connection to the SMTP server.

5.  The event is logged in emaillog.txt. Depending on whether the mail has been sent successfully, the status is 'success' or 'failure'.

6.  In the case of a failure, use the exception handling mechanism to return the error message to the GUI for display. Give as much detail to the user as you can, but not Java messages (users don't understand stack traces).

7.  If the message was sent successfully, clear all fields (except the field that shows server feedback) so that a new message can be typed. Alternatively, you can have a 'Clear' button.

DELIVERABLES

You must submit the following as part of the assignment

1.  Complete source code consisting of the Java classes described in assignments 1 and 2, possibly more.

2.  A UML class diagram of the program. The class diagram should show the names of the classes, the attributes and methods of the classes as well as the relationships between the classes.

Java, Programming

  • Category:- Java
  • Reference No.:- M9524280

Have any Question?


Related Questions in Java

Chatbotscreate a small networked chat application that is

Chatbots Create a small, networked chat application that is populated by bots. Introduction On an old server park, filled with applications from the early days of the internet, a few servers still run one of the earliest ...

Answer the following question whats the difference public

Answer the following Question : What's the difference public inheritance and private inheritance? What can derived classes inherit from base classes? What cannot be inherited from base classes?

Solving 2nd degree equationsbull write the following java

Solving 2nd degree equations • Write the following Java methods • boolean real-sols(double a, double b, double c): it returns true if the 2nd degree equation ax2 + bx + c has real solutions • double solution1(double a, d ...

Assignment game prototypeoverviewfor this assessment task

Assignment: Game Prototype Overview For this assessment task you are expected to construct a prototype level/area as a "proof of concept" for the game that you have designed in Assignment 1. The prototype should function ...

Operating systems assignment -problem 1 sharing the bridgea

Operating Systems Assignment - Problem 1: Sharing the Bridge A new single lane bridge is constructed to connect the North Island of New Zealand to the South Island of New Zealand. Farmers from each island use the bridge ...

Assessment socket programmingtaskwrite a java gui program

Assessment: Socket Programming Task Write a JAVA GUI program that would facilitate text chatting/exchanging between two or multiple computers over the network/internet, using the concept of JAVA socket programming. If yo ...

Assignment - java program using array of objectsobjectives

Assignment - JAVA Program using array of objects Objectives - This assessment item relates to the course learning outcomes as stated in the Unit Profile. Details - For this assignment, you are required to develop a Menu ...

Overviewyou are required to use java se 80 and javafx to

Overview You are required to use Java SE 8.0 and JavaFX to develop a Graphical User Interface (GUI) for the FlexiRent rental property management program created in Assignment 1. This assignment is designed to help you: 1 ...

Project requirementsfor the problem described in the next

Project requirements For the problem described in the next section, you must do the following: 1. include your student ID at the end of all filenames for all java code files. Three classes have been identified in section ...

Can someone kindly help me to consider whether java

Can someone kindly help me to consider whether Java provides the facility of operator overloading? If it does, may you kindly describe how overloading operators can be accomplished? If not, may you kindly describe why yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As