Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Add JUnit tests for the methods in the Attachment and Ticket classes. Then zip up the whole project and submit it through this assignment drop

Add JUnit tests for the methods in the Attachment and Ticket classes. Then zip up the whole project and submit it through this assignment drop box. Please note this is in the language of Java. The bottom two pieces of code are the attachment and ticket classes.

Here is the AWS XML File:

Compiler XML:

Jar Repositories XML:

misc XML:

customer support ticket file:

POM.XML:

4.0.0

org.example CustomerSupportTicket 1.0-SNAPSHOT org.apache.maven.plugins maven-compiler-plugin 7 7

.gitattributes:

# Auto detect text files and perform LF normalization * text=auto

.gitignore:

# Default ignored files /shelf/ /workspace.xml # Datasource local storage ignored files /../../../../../../../:\Users\jamccune\Documents\INFO 1541 Java III\CustomerSupportTicket\.idea/dataSources/ /dataSources.local.xml # Editor-based HTTP Client requests /httpRequests/

Here is the attachment class:

public class Attachment { private String name;

private byte[] contents;

public String getName() { return name; }

public void setName(String name) { this.name = name; }

public byte[] getContents() { return contents; }

public void setContents(byte[] contents) { this.contents = contents; } }

Here is the Ticket class:

import java.util.Collection; import java.util.LinkedHashMap; import java.util.Map;

public class Ticket { private String customerName;

private String subject;

private String body;

private Map attachments = new LinkedHashMap<>();

public String getCustomerName() { return customerName; }

public void setCustomerName(String customerName) { this.customerName = customerName; }

public String getSubject() { return subject; }

public void setSubject(String subject) { this.subject = subject; }

public String getBody() { return body; }

public void setBody(String body) { this.body = body; }

public Attachment getAttachment(String name) { return this.attachments.get(name); }

public Collection getAttachments() { return this.attachments.values(); }

public void addAttachment(Attachment attachment) { this.attachments.put(attachment.getName(), attachment); }

public int getNumberOfAttachments() { return this.attachments.size(); } }

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

Relational Database And SQL

Authors: Lucy Scott

3rd Edition

1087899699, 978-1087899695

More Books

Students also viewed these Databases questions

Question

1-1 Define the term marketing 24

Answered: 1 week ago

Question

How does italian-american culture use value orientations

Answered: 1 week ago

Question

What qualities do you see as necessary for your line of work?

Answered: 1 week ago