Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Code a JAVA PROGRAM

Code a JAVA PROGRAM

Computer Science

Code a JAVA PROGRAM . The module is Delivery Module in auction System. The module is in Console-based. Code JAVA program using [Apache NetBeans IDE 12.0]
 

The chosen ADT must be different between the members? (For example: Student A chose ADT list for member management and Student B also chose ADT list for item management)

ANSWER: If the same ADT is chosen, they should be at least different implementations. Please refer to the rubrics on how marks will be allocated.

b. What is the point of implementing ADTs by ourselves when the code is simply given in the sample code: what is preventing us from just copying whatever java interface or class we need for our ADT? Is that considered plagiarism?

ANSWER:

? The point is to learn more about ADTs (other ADTs, other implementations, etc.).

? The code given in the sample code is just one example of many ways to implement some of the basic collection ADTs. There are many alternative ways of implementing such ADTs. In addition, there are many other collection ADTs (refer to this non-exhaustive list for some examples) and you may even create your own ADTs with your required characteristics and operations.

? If students choose to directly use the ADT implementation given in the sample code, their marks for assessment criteria “Collection ADT implementation - originality” would be considered to be in the “Developing” category. Refer to the Assignment Rubrics for details.

2. ADT Operations

Do I have to include the operations that I don't use in my ADT?

ANSWER:

? Your ADT should contain all the basic operations for that ADT for completeness.

Remember the principle of reusability ... your ADT may be used in future

projects for different applications.

? It is not compulsory to use all the ADT operations in your client program.

However, it would be good if you can use your creativity to demonstrate

meaningful use of the ADT operations where possible in your client program.

3. ADT Specifications

a. Good and bad practices in writing ADT specifications

Continued next page →

Good and Bad Practices

b. Do we need to include an iterator into the ADT Specification if we

implemented the iterator for our ADT?

ANSWER: Any operation/method (i.e. not the Iterator object itself) that is

available for the client to invoke should be included in the ADT

specification.

c.

4. ADT Implementation: Java Interface - Good and Bad Practices

5. ADT Implementation: Java Class - Good and Bad Practices

6. Collection ADT Implementation a. Approaches

To explain what is meant by “implementation approaches”, here is a non-exhaustive

list of examples of the different implementation approaches for the List ADT include:

? Array-based implementation

? Linked implementation

? Doubly linked implementation

? Circular linked implementation

? Circular doubly linked implementation

? Linked implementation with dummy/header node

? Etc, etc. etc.

b. Sorting algorithms

i. Will I get an additional mark for the sorting algorithm?

ANSWER: Depends on the appropriateness of implementation and use. Marks will

be awarded based on the rubrics.

7. Java Collections Framework

a. Can we use java.util.ArrayList, java.util.Stack, etc. in our assignment?

ANSWER: No, because the assignment requires you to create and implement your

own collection ADTs. Therefore, you may not use any predefined collection interfaces

and classes from the Java Collections Framework.

b. Is it OK to use comparator and collection.sort() to do sorting or we must do

our own sorting algorithm like quicksort and mergesort?

ANSWER:

Comparator - Yes.

Collection.sort() - No.

If you need to use a sorting operation, then you should implement your own.

8. Use of Java’s Predefined classes and interfaces.

a. Can we use Java's String, Double, Character, and GregorianCalendar classes?

ANSWER: Yes, you may use any Java interfaces and classes that are not

collections.

b. Can we use Java.util.Iterator?

ANSWER: Yes, you may use any Java interfaces and classes that are not

collections.

c.

9.

10.

B. Assignment Report

1. For the complete source code (for ADT implementation, entity class implementation,

etc.), can I embed screenshots of the source code in my report?

ANSWER: Yes, as long as they can be easily and clearly read. Do ensure that:

? Use light mode instead of dark mode in your IDE.

? Ensure that there is proper indentation for your class. To automatically format,

either

? Right-click on your mouse and then select Format, or

? Press <Alt><Shift><F>

? The font size is big enough (or you can zoom-in by pressing the Alt key and

then using the scroll wheel on your mouse) before you capture the screenshot

using either the Snipping Tool or Snip & Sketch tool that is automatically

provided by Windows.

2. For the documentation, do we need to write the overview of the chosen application

or the specific module (member module) that we worked on?

ANSWER: Both, as stated in the Assignment Report Template.

3. For every explanation in the documentation, is there any request for the word

count we need to have?

ANSWER: There is none. Just aim for a clear and concise explanation as stated in

the Assignment Report Template.

4. Is there any guideline for the documentation format like:

- Times New Roman, 12 point font size and so on?

ANSWER: Use the font type and size in the Assignment Report Template.

C. Client Class

1. Do we need to do type validation for the user input?

ANSWER: No, just focus on validations related to the use of collection ADTS.

2. What are validations that are related to the use collection ADTs?

ANSWER: These are validations that will invoke a method of the collection object.

3. For the Generate Report functionality, do I have to use other software?

ANSWER: No, you are not supposed to use other software. Instead, students are

required to write code in Java to generate the reports.

4. If I’m doing a CRUD module (e.g. Song Maintenance, Member Maintenance, etc), for

the Generate Report functionality, can I just list all the entries in the collection object?

ANSWER: Yes, but this would not demonstrate only an average level of creativity and

competency. If you want to get Ideal marks for the criteria “Client class(es) - creativity

and complexity”, the functionalities (including Generate Reports) should be such that

it involves creativity and complexity that demonstrates a high level of understanding

and competency in using collection ADTs.

5. Why is it better to use the Java interface instead of the implementation class

when declaring collection variables or parameters (see below for example)?

ListInterface<Employee> employeeList;

ANSWER: It's best practice to use the Java interface (e.g. ListInterface) as the type

for the variable because

a. this declaration restricts the allowed methods on the variable to

only the methods declared in ListInterface and

b. enforces the requirement for the implementation classes (e.g., ArrayList,

LinkedList, etc) to provide the implementations of all the abstract methods in the

interface.

Moreover, if we used the interface instead of the class as the type for method

parameters, e.g.

void displayList(ListInterface<Employee> employeeList)

we could replace the class (e.g., ArrayList, LinkedList, etc) with another class that

also implements ListInterface without modifying the subsequent statements in the

program.

D. Database / Files

1. For the database, do we need to use built-in Apache database or we need to

specially download the database software to connect to database such as SQL

Server?

ANSWER: You are not required to use a database for this assignment. If you do, you

may use any open-source database.

E. Entity Classes

1. Should constructors, setters, getters, toString, and equals methods be included in

each class?

ANSWER: Yes,it is a good OO programming practice to include constructors, setters,

getters, toString, and equals methods in each entity class.

2. Can entity classes include input statements (to obtain input from the user) and output

statements (to display output to the user)?

ANSWER: It is not a good design if you do so. Entity classes should NOT include any

input statements to obtain input from the user and output statements to display

output to the user. The best practice is to make each entity class a POJO (plain old

Java object) so that they can be part of the Model in a Model-View-Controller (MVC)

design pattern and should therefore be independent from the View (i.e. the

input/output interactions with the user) and Controller (the application program logic).

Similarly for a 3-tier or 4-tier architecture.

3. What is the difference between an entity class and a module?

ANSWER:

? An entity class represents the template for objects that you will store to

persistent storage (e.g. binary files, database table, etc.). Examples of entity

classes are Runner, Customer, etc. Entity classes SHOULD NOT include

statements to obtain input from the user (e.g. using Scanner) or displaying

output to the user (e.g. using System.out.print).

? A module is implemented as one or more classes that include the client logic to

carry out the functionalities of the system/application. These classes would

include input statements and output statements. Examples of very simple client

classes are Registration.java and RecordResults.java in the Chapter1 NetBeans

project.

4. Regarding the requirement "The implementation of one entity class which includes a

collection of entity objects as one of its data fields", if I have a MemberManagement

class that has a list of Member objects, does this fulfil the requirement?

ANSWER: No it doesn't fulfill this requirement but instead, it fulfills the requirement

below for the client class:

c. The design and implementation of one or more client classes that includes

i. at least one collection of entity objects as one of its data fields

5. Regarding the requirement “One entity class includes a data field which is a

collection of instances of another entity class", is it we MUST include at least for one

variable of our own ADT in one of the entity class ? or if our entity class have others

member ADT is good enough, which means my ADT is not used in any classes

variable?

ANSWER: You just need to use your own collection ADT at least once - be it in an

entity class or in a client class. Other than that, you may use your team members'

collection ADT.

If you have used your collection ADT in your client class, then you do not need to use your collection ADT in an entity class. However, your entity class still needs a collection object and for this, you may use your team members' collection ADT.

6. For "The implementation of one entity class which includes a collection of entity objects as one of its data fields;", we may use our team member's collection ADT but

if their ADT is not suitable for my entity class can I reuse my own ADT in the class ?

ANSWER: Yes. You "may use", not "must use"....

7.

F. Entity Class Diagram

1. Do we need to use draw.io to draw the entity class diagram?

ANSWER: You may use any appropriate software or tool. Ensure that the diagram that you paste in your report is clear.

2. Should we include our ADT interface and class in our class diagram?

ANSWER: No. The class diagram that you are required to submit is an entity class diagram.

G. Modules

1. There are 2 members in my team doing the Auction System. Can we just do member management and item management instead of the auction module?

ANSWER: Yes. Alternatively, one of you can choose the auction module as it can enable you to demonstrate more creativity/originality.

2. I remembered that you mentioned before that our modules did not need to be combined, right?

ANSWER: Yes. However, there are benefits in learning to use GitHub and integrating your modules.

Option 1

Low Cost Option
Download this past answer in few clicks

22.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE