• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Rob Spoor
  • Henry Wong
  • Liutauras Vilda
Saloon Keepers:
  • Tim Moores
  • Carey Brown
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh
  • Jj Roberts

How do I turn this UML into Java Code?

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello can someone good at java programming help me turn this UML class diagram into code here are the System requirements it should help you understand the class diagram that I have attached:

Each Course object maintains a list of the students on that course and the lecturer who
has been assigned to teach that course.

The Course object has behaviour that allow the adding and removing of students from
the course, assigning a teacher, getting a list of the currently assigned students, and the
currently assigned teacher.

Teachers are modelled as Lecturer objects. As a lecturer may teach more than one
course there is an association between Course and Lecturer. The taughtBy relationship
shows that a Course only has a single teacher, but that a lecturer may teach several
Courses.

Each Lecturer object also maintains a list of the Courses that it teaches.

There is a similar relationship between Course and Student. A course is attended by
zero or more Students, and a Student may attend multiple courses.

both Student and Lecture classes implement the Person interface.
item.

Rewrite a new class diagram to following: each student in a course has to take an exam
worth 60 percent and 4 courseworks worth 10 percent each. for each student taking the
course you will have to compute the course average mark.


uml_courses.jpg
[Thumbnail for uml_courses.jpg]
UML class diagram
 
Marshal
Posts: 67510
173
Mac Mac OS X IntelliJ IDE jQuery Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Where is your first stab at it? Please UseCodeTags when posting code.
 
Sheriff
Posts: 4968
318
IntelliJ IDE Python Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jason, welcome to the Ranch!

This looks very much like homework, and unfortunately for you nobody is going to do your work for you. What I suggest is: have a go at the problem yourself and if you get into difficulty then come back, show us what you have done, and tell us the specific problem you are having. You are much more likely to get help that way.

Some light reading for you in the meantime:
- DoYourOwnHomework
- NotACodeMill
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hello jason
i know i'm a little bit late but do you have the answer for this diagramm
 
Happily living in the valley of the dried frogs with a few tiny ads.
SKIP - a book about connecting industrious people with elderly land owners
https://coderanch.com/t/skip-book
reply
    Bookmark Topic Watch Topic
  • New Topic