Skip to content

AmeerQatmosh/Code-Refactory

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 

Repository files navigation

Advanced Software Development - Code Refactory

This refactored code addresses the following problems that make it difficult for other programmers to understand the code:

  1. Poor variable naming, such us: ans.
  2. Magic Numbers, like: 500 in this line of code: "setSize(500, 500);".
  3. No needed classes and methods (not used), such as: method saveAsText.
  4. No needed libraries, such as: "java.awt.BorderLayout".

Also in this refractory code , there are these functions:

  1. showSaveConfirmDialog()
  2. savePressed()
  3. newPressed()
  4. cutPressed()
  5. copyPressed()
  6. pastePressed()
  7. filePressed()
  8. quitePressed()
  9. openPressed()
  10. selectAllPressed()

All strings are placed in one file called: "Strings.java" you can reach it through:

Code-Refactory/SimpleEditor/src/edu/najah/cap/utils/Strings.java

About

Advanced Software Development Assignment 6 solution

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages