

clsDB class is used to store the records in database. Person and Item classes are also composed in Sale class. Person and Item classes implement Persist interface. Figure 7 shows POS UML class diagram which consists of PointOfSale base package containing Person, Item, Sale, and clsDB classes with Persist interface. Finally, a receipt is generated and the sale is saved in the database. A list of items is included in a new sale against a specific customer. In the case of an existing customer, the customer record is retrieved from the system. The cashier checks whether the customer is new or already existing. The Process Sale use-case is specified as customer comes to a shop counter with some selected items from a shop.

The set of UML diagrams consists of one UML class diagram, thirty- seven UML sequence diagrams, and sixty UML activity diagrams. The designed Process Sale use-case from a POS system is taken from Larman but changed according to our requirements. There are two reasons for selecting POS as a case study: firstly, it is a well-known case study secondly, it requires all the aspects focused in our code generation technique such as user interactions, object manipulations, etc. POS is a sale system which is used at checkout counters in a super store where the customers come up with different items to purchase. We use Point-of-Sale (POS) System case study which is described by Larman. The diagrams for case studies were created in a UML case tool which automatically generates XMI from UML diagrams.

This section provides a brief discussion on two real-life case studies, i.e., Point-of-Sale and University System which are used for experimental validation of the UJECTOR tool. The generated code for any class or class method can be viewed by clicking on any class or class method. The generated code is presented as tree hierarchy containing packages, the classes in the packages, and the methods in the classes. The generated code can also be viewed from the tool, as shown in figure 6. It also keeps track of the total time taken by the tool to generate specific number of Java code lines. It provides information about number of input class, sequence, and activity diagrams, number of referenced sequence and activity diagrams in sequence diagram, number of implemented interfaces, number of completely generated classes and interfaces, number of implemented class methods, number of resolved relationships. tool generates a summary of the generated code as shown in figure 5.
