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

DLBCSDSJCL01 - Data Structures and Java Class Library - Summary

Rating
-
Sold
-
Pages
12
Uploaded on
06-12-2024
Written in
2024/2025

DLBCSDSJCL01 - Data Structures and Java Class Library - Summary

Institution
Course









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

Written for

Institution
Course

Document information

Uploaded on
December 6, 2024
Number of pages
12
Written in
2024/2025
Type
Summary

Subjects

Content preview

DATA STRUCTURES AND JAVA CLASS LIBRARY
PERSONAL NOTES ( S2M1 )


UNIT 1 - PROGRAMMING STYLE


Why comment and document the code ?
1. Readability - Easier to read
2. Comprehensibility - Can be understood by others
3. Collaboration - Can facilitate fruitful collaboration
4. Reusability - Can be effectively used by others


How to comment and document code
1. Write documentation in comments
2. Use Javadoc
3. Provide code annotations
4. Use code conventions effectively


Comments are used to describe and document source code
- Special characters inform compiler that following words shouldn’t be interpreted as code
- Single-line comments ( “//” )
- Multi-line comments ( "/* */”)


Javadoc allows to automatically generate documentation from code that is commented following
some standard notation
- These comments must be introduced using (“/**”)
- Uses (“@”) to generate HTML documentation pages

- @author denotes the author of the file
- @param describes a method’s parameter
- @returns describes what the method returns
- @throws lists possible error sources and thrown exceptions

, Code Annotations add metadata to source code
- Annotations start with (“@”)
- Used to annotate classes, methods and attributes
- Helps developers recognize errors more quickly

- @Override marks methods that override the methods of a superclass
- @Deprecated marks classes, methods and attributes that shouldn’t be used in new code


Code Conventions is a standardized way of structuring and formatting code improving readability
- Package names in lowercase
- Name classes and interfaces as nouns starting with capital letter
- Camel case when name consists of multiple words
- Name methods as verbs
- Fully capitalize constants
- Order related items together
- Declare variables at beginning of code block
- Write each declaration on separate line
- Group sections using blank lines
- Indent code properly using (“{}”)


UNIT 2 - WORKING WITH OBJECTS


How to work effectively with objects
String representation
- Method toString() outputs any object content to the console as a string
- It reduces programming effort and unnecessary concatenations of strings


Equality operator (“==”) compares the identity of objects, not content
- Compares whether two data types refer to the same object
- Primitive data types are easily compared
- Complex data types, doesn’t compare content of objects
$12.17
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
DylanHattingh

Get to know the seller

Seller avatar
DylanHattingh
Follow You need to be logged in order to follow users or courses
Sold
0
Member since
4 year
Number of followers
0
Documents
33
Last sold
-

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 tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card 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