Object Oriented Design and ProgrammingWeek 6Emran Salahiddin, Chiatalia Samani, Anchal Shrestha (Sydney)Hanspreet Kaur, Allan NG (Melbourne)Kent Institute Australia Pty. Ltd.ABN 49 003 577 302 CRICOS Code: 00161ERTO Code: 90458 TEQSA Provider Number: PRV12051Version 2 – 18thDecember 2015
SLIDE TITLEFarrell, J. (2017) Programming Logic and Design, Comprehensive (9th ed.) Cengage Learning 2
Programming Logic and DesignNinth EditionProgramming and coding standards3
Introduction•To build reliable, scalable and maintainable Java applications :--Development teams should adopt proven design techniques.-And should choose good coding standards.-Will result in code consistency, which makes it easier to understand, develop and maintain the application.-Programmer can make the code more efficient and performance effective4
File organization Standards•Java source are named as *. java •The compiled Java byte code is named as *.class file•Each Java source file contains a single public class or interface. •Each class must be placed in a separate file. •Java classes should be packaged in a new java package for each self-contained project or group of related functionality.6
File organization Standards•Java Source files should have the following ordering: Package and Import statements, beginning comments, Class and Interface Declarations.•There should not be any duplicate import statement.•Files longer than 2000 lines should be avoided.7
Source code style guidelines•Beginning Comments -All source files should begin with header as follows carrying the Title, Version, Date in mm/dd/yy format and the copyright information.