For the given sequence diagram, Which of the following correctly implements the design?  a)public class Student {      private Course c1 = new Course();      public void enroll()      {           c1.register();           c1.accessCourse();      } } b) public class Course {      private Course c1 = new Student();      public void enroll()      {           c1.register();           c1.accessCourse();      } } c) public class Student {      private Student s1 = new Course();      public void enroll()      {           s1.register();           s1.accessCourse();      } } d)public class Course {      private Course s1 = new Student();      public void enroll()      {           s1.register();           s1.accessCourse();      } } e) public class Course {      private Course c1 = new Course();      public void enroll()      {           s1.register();           s1.accessCourse();      } }

Systems Architecture
7th Edition
ISBN:9781305080195
Author:Stephen D. Burd
Publisher:Stephen D. Burd
Chapter3: Data Representation
Section: Chapter Questions
Problem 3RP
icon
Related questions
Question

For the given sequence diagram,

Which of the following correctly implements the design? 

a)public class Student

{

     private Course c1 = new Course();

     public void enroll()

     {

          c1.register();

          c1.accessCourse();

     }

}

b) public class Course

{

     private Course c1 = new Student();

     public void enroll()

     {

          c1.register();

          c1.accessCourse();

     }

}

c) public class Student

{

     private Student s1 = new Course();

     public void enroll()

     {

          s1.register();

          s1.accessCourse();

     }

}

d)public class Course

{

     private Course s1 = new Student();

     public void enroll()

     {

          s1.register();

          s1.accessCourse();

     }

}

e) public class Course

{

     private Course c1 = new Course();

     public void enroll()

     {

          s1.register();

          s1.accessCourse();

     }

}

s1:Student
enroll()
<<create>>
c1:Course
register()
accessCourse()
Transcribed Image Text:s1:Student enroll() <<create>> c1:Course register() accessCourse()
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Distributed Database Concepts
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Recommended textbooks for you
Systems Architecture
Systems Architecture
Computer Science
ISBN:
9781305080195
Author:
Stephen D. Burd
Publisher:
Cengage Learning