Construction Cost Estimation System
Construction Cost Estimation System
IMPORTANT INSTRUCTIONS
I. Business Scenario:
A leading construction company wants to expedite their process of cost estimations for their various
ongoing projects. The company wants to automate the process of this cost & time estimation aspect, for
all those projects starting this financial year.
The construction project details of the company are stored in a .txt file (as a comma separated fields).
This file contains the details/records of the projects under various categories like Commercial,
Residential and Infrastructural. The cost and Time duration in months are to be calculated for all those
projects starting this financial year.
The proposed system is supposed to pick up the project details which are commencing in the current
financial year from the source data and calculate the cost & duration of the project in months, based on
the data provided in the requirement specification. After calculating, the system needs to persist those
records in the database.
Import the below attached skeleton code into your eclipse project and implement the
required functionalities. The skeleton also has .SQL file which can be used to set up your database.
V. Technical Requirements
For both the functional requirements 1 and 2, component specification and method specification are
given below. Please follow the same order to implement them using the code skeleton.
Name
Component Reads the input text file, and convert the data into objects
Definition
Files Included ConstructionProjectEstimationService.java, ApplicationUtil.java, ConstructionProject.java,
(refer inputfeed.txt,ConstructionEstimationException.java
Skeleton)
Responsibilities Reads the input file.
Perform validation to check if the Construction Project is planned for the
current year.
Build and return the ConstructionProject value object.
Resources Input File Name: inputfeed.txt
File Structure:
<projectId>,<plannedDOStart>, <typeOfProject>, < structure>, <areaInSqFt>,
<estimatedCostInlac>, <estimatedTimeInMonths>
Design a. Input file format is .txt and is comma separated (Sample rows are added. You can add
Constraints any number of rows to test your service class, from main method.
b. Do not hard code the input file name inside any method .It has to be referred from the
input argument only as per code skeleton.
c. From the given input file, filter the Construction Project details, which are planned for
the current financial year.
d. Assume that the Currency related fields are in INR.
e. Assume that the Date of Start in the file will be in the format yyyy-MM-dd.
f. Do not change the data types of the value object given in POJO.
g. Always convert the date of start value to java.util.date with format, yyyy-MM-dd
before setting in ConstructionProject value object.
h. Use ApplicationUtil.java for reading file, performing date operations, etc.
Note: Sample rows are given in the input file. You can add any number of rows to test your
service class, from main method.
Process Flow a. The app will be invoked by calling the ConstructionProjectEstimationService.
addConstructionProjectDetails with the inputfeed (.txt file)
b. Read the file using File I/O or Java Streams in ApplicationUtil.readFile method
c. Return a list of Construction Project rows from input file, from the readFile method
considering records which are passing the current financial year check constraint.
d. Code the method ConstructionProjectEstimationService. buildConstructionProjectList.
Call the readFile method from this method. Read every line from the list returned by
readFile method, split the records based on comma separator and use
e. For each record calculate the time and cost involved by calling the appropriate service
method
f. The method should return a list of ConstructionProject objects.
g. Use the ApplicationUtil. convertStringToDate method to convert the date from String
Format to java.util.Date format (yyyy-MM-dd).
h. Build the ConstructionProject Value Object from the values obtained in every line
Construction Management System
Exceptional While doing File I/O in the ApplicationUtil.readFile method, catch all exceptions and throw
Conditions application specific exception, ConstructionEstimationException.
Based on the type of the Project & the Structure , according to the required area of
Construction, the cost & time have to be calculated based on the base data available in the
above table:
For eg. If the Project Type is “Commercial” and the structure is “Shopping Complex” the cost
incurred for the construction of per sq. ft is Rs.2600 and the time taken for the construction
of the 1000 sq ft of the same project is 0.23 Months, calculation has to be performed on the
similar basis i.e Pro rata basis depending upon the type and the area of construction.