logo

Wood Flooring Cost Estimation: A Java Programming Solution

   

Added on  2024-05-29

51 Pages4824 Words187 Views
 | 
 | 
 | 
UNIT 41 PROGRAMMING IN JAVA
Wood Flooring Cost Estimation: A Java Programming Solution_1

Contents
List of figures.........................................................................................................................................2
Introduction...........................................................................................................................................4
LO1........................................................................................................................................................5
P 1.1...................................................................................................................................................5
1.1 Java has many features including Object Oriented, Platform Independent, Robust, Interpreted,
and Multi-threaded. Discuss the principles, characteristics, and features of programming in Java? 5
1.2 P 1.2, M1......................................................................................................................................6
M1:....................................................................................................................................................7
LO2........................................................................................................................................................8
2.1 P 2.1, D1.......................................................................................................................................8
Design a Java programming solution for the given problem scenario using UML diagrams. Your
model should include use case diagrams, class diagrams with attributes and operations of each
class and the relationship, including inheritance if any between classes. Define clearly each class,
main methods, and properties..........................................................................................................8
2.2 Identify the components and file structures incorporated in the Java project file required to
implement the application..............................................................................................................10
D1:...................................................................................................................................................11
LO3 Be able to implement Java solutions............................................................................................12
3.1 Using OOP principles (Abstraction, Inheritance, polymorphism, classes, attributes, methods,
objects etc), implement the Carpeting calculator with all the functionalities listed in the
requirements based on your design in task 2..................................................................................12
3.2 Define how the components (the classes you define, the UI and the class libraries) are related
to implementing the design requirements......................................................................................12
3.3 Elaborate by example the implementation of object behaviors using structures to meet the
design algorithms as implemented in 3. 1 above............................................................................19
3.4 Demonstrate with evidence how you implemented effective exception handling and error
reporting in the application (M2)....................................................................................................24
M2: Exceptional handling................................................................................................................30
3.5 Netbeans is a rich IDE, demonstrate your effective command in the usage of the IDE to
develop your solution......................................................................................................................31
D2:...................................................................................................................................................31
LO4 Be able to test and document Java solutions...............................................................................32
1
Wood Flooring Cost Estimation: A Java Programming Solution_2

4.1 Critically review and test the overall performance of your system. You have to create the
appropriate test cases to test the functional and non-functional requirements of the application
produced[D3]..................................................................................................................................32
4.2 Analyse the actual results (form 4.1 above) against expected results and identify any
discrepancies and explain with evidence how would you resolve these.[M3]................................37
4.3 Distribute your application among actual users for evaluation. To this end, you have to
prepare a feedback form for the users to record their experience/feedback in the use of your
application. Collate their feedback, critically evaluate and analyze their feedback and based on
their feedback make recommendations for further improvements................................................41
4.4 Create clear user documentation for the solution. Where necessary, include relevant
screenshots and instructions. This can be a help file integrated with the application which can be
accessed via a menu system (e.g. Under Help menu item).............................................................42
4.5 Create technical documentation for the solution. You are also required to document all the
technical steps used to develop and deploy your solution. This will be used for the support and
maintenance of your system...........................................................................................................43
Conclusion...........................................................................................................................................49
References...........................................................................................................................................50
List of figures
Figure 1 JVM description.......................................................................................................................7
Figure 2 use case...................................................................................................................................9
Figure 3 case file..................................................................................................................................10
Figure 4 Example.................................................................................................................................12
Figure 5 values insert in the specified fields........................................................................................13
Figure 6 calculate time and cost..........................................................................................................14
Figure 7 enter values for another room..............................................................................................15
Figure 8 calculation of another room..................................................................................................16
Figure 9 calculates a total estimation..................................................................................................17
Figure 10 example of total estimation.................................................................................................18
Figure 11 payment mode.....................................................................................................................18
Figure 12 another payment mode.......................................................................................................19
Figure 13 code 1..................................................................................................................................20
Figure 14 code 2..................................................................................................................................21
Figure 15 code 3..................................................................................................................................22
Figure 16 code 4..................................................................................................................................22
Figure 17 code 5..................................................................................................................................23
Figure 18 code 6..................................................................................................................................24
Figure 19 testing 1...............................................................................................................................25
Figure 20 testing 2...............................................................................................................................26
2
Wood Flooring Cost Estimation: A Java Programming Solution_3

Figure 21 testing 3...............................................................................................................................27
Figure 22 testing 4...............................................................................................................................28
Figure 23 testing 5...............................................................................................................................29
Figure 24 testing 6...............................................................................................................................30
Figure 25 test case 1............................................................................................................................32
Figure 26 test case 2............................................................................................................................33
Figure 27 test case 3............................................................................................................................34
Figure 28 test case 4............................................................................................................................35
Figure 29 test case 5............................................................................................................................36
Figure 30 test case 6............................................................................................................................37
Figure 31 enter values.........................................................................................................................38
Figure 32 correct values and give results.............................................................................................39
Figure 33 incorrect values and apply handling....................................................................................40
Figure 34 produces expected output...................................................................................................41
Figure 35 open project file...................................................................................................................42
Figure 36 expand to open the code file...............................................................................................42
Figure 37 executing code file...............................................................................................................43
Figure 38 step 1...................................................................................................................................44
Figure 39 step 2...................................................................................................................................44
Figure 40 step 3...................................................................................................................................45
Figure 41 step 4...................................................................................................................................46
Figure 42 step 5...................................................................................................................................47
3
Wood Flooring Cost Estimation: A Java Programming Solution_4

Introduction
This report is developed and designed for calculating wood flooring cost by implementing area for
estimating cost and time using java programming. In this document, testing will be performed to
validate the data and match with the actual result. Java program used all the OOPs concepts and
utilize their features in programming for implement this problem of Wood Flooring Cost Estimation.
This report determines all the required test cases and validation of entered data with example which
is provided as screenshots. The whole file will be prepared on the basis of this problem project and
examine all the requirements in proper manner.
4
Wood Flooring Cost Estimation: A Java Programming Solution_5

LO1
P 1.1
1.1 Java has many features including Object Oriented, Platform
Independent, Robust, Interpreted, and Multi-threaded. Discuss the
principles, characteristics, and features of programming in Java?
Introduction
Java programming is a simple language and utilize OOPs concept features in programming
as developing classes and importing methods and it is similar to C++ object oriented
concepts. Java language is characterized by a determination and comprises a developing
paradigm, interpreter, library files and a runtime environment such as Java virtual machine
(JVM). This JVM runtime enables software engineers to compose source code in a different
language than the java which still keeps running on the JVM. The Java stage is generally
connected with the JVM and libraries of java file (Shaykhian & G.A., 2007).
Principles
The java has 3 most used principles are an inheritance, polymorphism, and encapsulation and
it follows OOPs programming concepts which have classes and objects methodology. An
object is main element which consist of attributes and methods. The class is part of program ,
outline based on which objects are developed (Malabarba, Pandey, R., Gragg, Barr, E, J, 2000).
Inheritance:
This principle is used for parent and child properties or attributes inheriting. Basically child or
derived class can inherit the properties of the base class.
Polymorphism:
'Poly' implies numerous and 'transform' implies forms. This implies that it has articulations that have
numerous structures or similar proclamations can have diverse implications in various settings.
Encapsulation:
It means that binding of attributes and its properties is called data encapsulation.
Features
Java has a special addition for reusability of Code.
Accentuation on information as opposed to the method.
Information is covered up and can't be used by outer functions.
Objects can work with each other through functions or methods
New data information and methods can be effortlessly included.
5
Wood Flooring Cost Estimation: A Java Programming Solution_6

Java has many more features to use in programmings such as robustness, more secure of
data, multithreading, applets implementation for web framework or more.
Characteristics
Java has many characteristics similar to features in a different manner as follows:
Distributed:
Java was composed of the conveyed condition.
Java can be transmitted, run over the web.
Interpreted:
Java supports cross-stage code using Java byte code.
JVM can change Bytecode in any phase.
Object-oriented:
Object-oriented programming concepts are used in Java dialect.
Similar to C++, java gives the greater part of the OOP highlights.
Java is unadulterated Object oriented language and C++ is not fully based on OOP.
1.2 P 1.2, M1
1.2 Critically evaluate the environmental flexibility of programming in Java and thus in this context
explain the role of Java Virtual Machine (JVM).
Platform Independence
Java dialect is organize free. As an issue of first significance, its source code gets collected into a class
record which is generally called Byte Code. Byte code contains machine headings for the working
system. This made byte code is same for all phases of OS like Windows, Linux, Mac et cetera. Byte
code is evaluated and deciphered by Java Virtual Machine (JVM). JVM is organize subordinate yet it
is open for all stages. In this way byte code headings and JVM together influences Java to organize
self-ruling.
Embedded Hardware Programming
Java gives an extension of Micro Edition API which is sensible for embedded applications and known
as Java ME Embedded. It engages human to become significantly secure, strong, versatile and
pragmatic applications for embedded contraptions like flight control structures and machines
identified with cash exchange and that's only the tip of the ice berg.
Mobile Applications
Java Mobile Environment stays for Java Micro Edition. It enables us to make applications for
contraptions like set-top boxes, PDAs et cetera. Java ME is especially expected for battery worked
devices with some memory and dealing with speed.
6
Wood Flooring Cost Estimation: A Java Programming Solution_7

M1:
Role of JVM
JVM remains for java virtual machine which is dynamic or virtual figuring machine is the usage of
java virtual machine specification. It deciphers the interpreted java programmed code as the
bytecode and aides in execution of program relying on the particular stage. Java is platform
independent language i.e. it can keep running on any stage without reworking the code. This
component is supported by JVM. Fundamentally JVM is set of PC programs and data structures that
run arranged bytecode on any machine such as Java language which is once it is compiled can run
anywhere. JVM is virtual, on the grounds that nature in which it runs bytecode is to such an extent
that it stays isolated from the OS and can be expelled or introduced without influencing it. JVM
changes over the bytecode into the machine or a platform based code and after that run it.
Figure 1 JVM description
7
Wood Flooring Cost Estimation: A Java Programming Solution_8

End of preview

Want to access all the pages? Upload your documents or become a member.

Related Documents