[ Pobierz całość w formacie PDF ]
.Properly performed, it establishes thebounds for software implementation.Implementation should be performed only in orderto satisfy system requirements, either explicitly indicated by the domain model oranticipated by the system architect or senior developers.3.In the development of the design model, it is important to ensure that objects aredecomposed to a level where they are fully understood by developers.It is thedevelopers, not the designers, who must believe the software modules are easy toimplement.4.Once a first pass has been made at both the domain and design model, beginimplementation based upon the plan established by the design.The design does nothave to be complete; the goal is that the implementation of software components should67 always be according to some predefined plan.Once development begins, proceed toincrementally examine other parts of the domain model and design other parts of thesystem.Over time, the domain model and the design model will be refined toaccommodate discoveries in the requirements gathering, design decisions, and to copewith implementation issues.Again, Spaghetti Code is far less likely to occur if there is anoverall software process in which the requirements and design are specified in advanceof the implementation, instead of occurring concurrently.ExampleThis is a frequent problem demonstrated by people new to object-oriented development,who map system requirements directly to functions, using objects as a place to group relatedfunctions.Each function contains an entire process flow that completely implements aparticular task.For example, the code segment that follows contains functions such asinitMenus(), getConnection(), and executeQuery(), which completely execute the specifiedoperation.Each object method contains a single process flow that performs all of the steps insequence needed to perform the task.The object retains little or no state informationbetween successive invocations; rather, the class variables are temporary storage locationsto handle intermediate results of a single process flow." LINES_1 16public class Showcase extends Appletimplements EventOutObserver {//GlobalsStringhomeUrl="http://www.webserver.com/images/";int caseState;String url="jdbc:odbc:WebApp";Driver theDriver;Connection con=null;ResultSet rs,counter;int theLevel;int count=0;String tino;" LINES_17 32int [] clickx;int [] clicky;String [] actions;String [] images;String [] spectra;String showcaseQuery=null;TextArea output=null;Browser browser=null;Node material=null;EventInSFColor diffuseColor=null;EventOutSFColor outputColor=null;EventOutSFTime touchTime=null;boolean error=false;EventInMFNode addChildren;Node mainGroup=null;EventOutSFVec2f coord=null;" LINES_33 80EventInSFVec3f translation=null;"EventOutSFTime theClick=null;Image test;int rx,ry;float arx,ary;int b=0;Graphics gg=null;//Initialize applet68 public void init() {super.init(); setLayout(null);initMenus();output=new TextArea(5, 40);add(output);browser=(Browser)Browser.getBrowser((Applet)this);addNotify(); resize(920,800);initUndoStack();caseState=0; theLevel=0;setClock(0);try { theDriver=new postgresql.Driver(); }catch(Exception e) {};try { con=DriverManager.getConnection("jdbc:postgresql://www.webserver.com/WebApps","postgres","");Statement stmt=con.createStatement();showcaseQuery="SELECT sid,case,button,text , name, actions FROMWebAppWHERE case="+caseState+" andlevel="+theLevel+";";rs=stmt.executeQuery(showcaseQuery);count=0; while (rs.next())count++;System.out.println("Count="+count+"\n");rs=stmt.executeQuery(showcaseQuery);}catch(Exception e) {System.out.println(" LINES_81 128"Error connecting and running:"+e);};nextButton=newsymantec.itools.awt.ImageButton();lastButton=newsymantec.itools.awt.ImageButton();try {nextButton.setImageURL(newjava.net.URL("http://www.webserver.com:8080/images/next.jpg"));if (count [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • hanula1950.keep.pl