100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Class notes

UML Diagrams and Writing Java Applications

Rating
-
Sold
-
Pages
5
Uploaded on
16-06-2021
Written in
2020/2021

UML diagrams are used so that programmers can quickly see the the idea of the classes they will write before they write them out. These diagrams are also used as a the communicating tool between programmers and other stakeholders such as sponsors of projects, the clients who wish to buy software and other programmers like the client programmers who will create objects from the class they write

Show more Read less









Whoops! We can’t load your doc right now. Try again or contact support.

Document information

Uploaded on
June 16, 2021
Number of pages
5
Written in
2020/2021
Type
Class notes
Professor(s)
Unknown
Contains
All classes

Content preview

CSI21M1 Java Programming Notes, prepared by Mr. S. Nyika, Semester I, 2019


Lecture 2: UML Diagrams and Writing Java Applications

Objectives:
At the end of this lecture, students will be able to:
• use Unified Modeling Language to design a class
• write a Java class
• write a Java application
• use Camel Casing when writing Class name, variable identifiers and methods
• use appropriate conventions such as correct indentations in code blocks
• understand the need to use conventions in coding
• how to save a Java file

Notes:

Class Programmers design classes using Unified Modeling Language diagrams and after that they
write the source code of the class using the knowledge they have about Java classes as seen in lecture 1.
Suppose the class programmers needed to design a Student class, they would proceed and use a class
diagram which is a UML diagram. UML diagrams are used so that programmers can quickly see the
idea of the classes they will write before they write them out. These diagrams are also used as a
communicating tool between programmers and other stackholders such as sponsors of projects, the
clients who wish buy a software and other programmers like the client programmers who will create
objects from the class they write. There are a total of seven basic UML diagrams. These are:
• Class diagram
• Object diagram
• Component diagram
• Use case diagram
• Interaction diagram
• Statechart diagram
• Activitiy diagram

Class Diagram

Class diagrams basically represent the Object Oriented view of the system which is static in nature. It is
generally used for development purposes.

Use case diagram

A use case diagram are a set of use cases, actors and their relationship. They represent the use case
view of the system.




Page 1 of 5

, CSI21M1 Java Programming Notes, prepared by Mr. S. Nyika, Semester I, 2019

The Student class example

The UML class diagram




This diagram was written using a program called Dia Diagrams under Linux Operating System.The –
sign here shows that the fields are private and the + sign shows that the methods are public. Private and
public are called access specifiers. After the class diagram has been drawn, the class programmers now
write the source code of the class in an IDE of choice such as NetBeans as shown below:

The Student Class Source Code:




Page 2 of 5
R50,00
Get access to the full document:

100% satisfaction guarantee
Immediately available after payment
Both online and in PDF
No strings attached

Get to know the seller
Seller avatar
keanuperumal

Get to know the seller

Seller avatar
keanuperumal Walter Sisulu University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1
Member since
4 year
Number of followers
1
Documents
10
Last sold
4 year ago

0,0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their exams and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can immediately select a different document that better matches what you need.

Pay how you prefer, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card or EFT and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Frequently asked questions