Question: Can someone please provide code in C# file input and output for below problem. --------------------------------------------------------------------- Renewal Notification XYZ General Insurance Company Limited wants to verify
Can someone please provide code in C# file input and output for below problem.
---------------------------------------------------------------------
Renewal Notification
XYZ General Insurance Company Limited wants to verify all their policy details stored in a csv file and send notification to the customers for whom the policy will expire in next 10 days. A customer can hold any number of policies in the company. So the company will consolidate the number of policies that would expire in next 10 days and total premium amount for every particular customer. Write a program to read the policy details from a csv file and display the details required for send a renewal notification. Create a class Policy with following attributes
| Data Type | Varialbe |
| int | _id |
| string | _startDate |
| string | _renewalDate |
| double | _premiumPayable |
| string | _customerName |
Include appropriate Properties as follows. private string _name; public string Name { get { return _name; } set { _name = value; } } Create a Program class. Create a Policy object using the policy details obtained from the csv file and store the policy object into a policyList. Assume that the current date is 01/01/2017. Iterate the policylist, insert the policy details and premium into the Dictionary when the policy ends in 10 days (Exactly). The Dictionary consist of key value pair, the key is the customer name and the value is an arraylist which holds the count of policies taken by the customer and the total premium amount. Finally print the details as shown sample input output. Input and Output Format: The input file name must be "input.csv" The input file consists of a set of user details, in the order user id,startDate(dd/mm.yyyy), renewalDate(dd/mm/yyyy),Premium Amount,Name. Eg: 1,13/02/2016,03/06/2017,5000,Albert Refer sample input and output for formatting specifications. All text in bold corresponds to the input and rest corresponds to the output. File Input: 1 12/02/2015 12/02/2017 5000 James 2 13/02/2016 11/01/2017 5000 Albert 3 24/05/2016 11/01/2017 10000 Albert 4 12/03/2017 19/05/2017 10000 Mari Sample Output 1: Customer : Albert Number of policies to be renewed : 2 Total Amount : 15000 -------------------------------
Thank you
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
