Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

PLEASE PLEASE PLEASE PLEASE I NEED HELP BY USING JAVA LANGUAUGE ! PLEASE ANSWER IT PLEASE In the LTUC system Each student has an array

PLEASE PLEASE PLEASE PLEASE I NEED HELP BY USING JAVA LANGUAUGE ! PLEASE ANSWER IT PLEASE

  1. In the LTUC system Each student has an array of his/her marks for the courses s/he has finished. We have two types of Students (Undergraduate and Postgraduate). Student class contains the number of taken courses variable to specify the number of courses taken. For example if number of courses is 10 then we have 10 values in the array and so on. You found that the students like to display their marks sorted so you wanted to implement sorting algorithm to sort the array. The idea is that each sorting algorithm can be used in specific situations. Let us assume now that you want to implement Two different sorting algorithms (Bubble Sort and Selection Sort). What design pattern allows you to select algorithm from set of algorithms at runtime. Design the UML and implement the code. Provide snapshots and full code.

  1. LTUC created new division that is Called ASAC. The grades of the students at LTUC are represented as Array of grades while grades of ASAC students are represented as ArrayList of grades. The Grade class consist of mark, Course ID, Student ID and semester. Write the code of applying the Iterator design pattern to create uniform way to show all the marks for a specific student regardless of his division (ASAC or LTUC). Why you think Iterator is the best choice here.

  1. In LTUC a branch of the well-known American coffee shop (Coffee Maker) has opened. Coffee Maker sells the following types of coffee:
    1. Regular
    2. Black
    3. Cappuccino

But Coffee Maker wants to add the Arabian style to LTUC coffee types. So we will have:

The original branch is creating

LTUC branch is creating

  • AmericanStyleRegular
  • AmericanStyleBlack
  • AmericanStyleCappuccino
  • ArabianStyleRegular
  • ArabianStyleBlack
  • ArabianStyleCappuccino

Which design pattern is suitable for the creation of these coffee types situation? Draw the UML of the solution. Explain your choice.

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

9th Edition

B01JXPZ7AK, 9780805360479

More Books

Students also viewed these Databases questions

Question

6. What determines the quantity of a good that sellers supply?

Answered: 1 week ago

Question

=+How does it affect the steady-state rate of growth?

Answered: 1 week ago