Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Please Please Please HELP ME!! I JUST HAVE 6 HOURS TO SUBMIT IT PLEASE HELP ME In the LTUC system Each student has an array

Please Please Please HELP ME!!

I JUST HAVE 6 HOURS TO SUBMIT IT PLEASE HELP ME

  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

Databases On The Web Designing And Programming For Network Access

Authors: Patricia Ju

1st Edition

1558515100, 978-1558515109

Students also viewed these Databases questions

Question

=+ a. What happens to the labor demand curve?

Answered: 1 week ago