Find best Interview questions and answer for Navatar Job. Some people added Navatar interview Questions in our Website. Check now and Prepare for your job interview. Interview questions are useful to attend job interviews and get shortlisted for job position. Find best Navatar Interview Questions and Answers for Freshers and experienced. These questions can surely help in preparing for Navatar interview or job.
This page contains the most recently asked technical questions and answers in the Navatar.
All of the questions listed below were collected by students recently placed at Navatar.
BusinessLayer –> QuoteEngine.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using TravelInsuranceQuote.DataLayer;
namespace TravelInsuranceQuote.BusinessLayer
{
public class QuoteEngine
{
public double GetBasePremium(TripType tripType)
{
double basePremium = 0;
switch (tripType)
{
case TripType.Single:
basePremium = 20.00;
break;
case TripType.Annual:
basePremium = 80.00;
break;
}
return basePremium;
}
public double GetAgeRating(int age)
{
if (age <= 18)
{
return 1.2;
}
else if (age <= 45)
{
return 1.0;
}
else if (age <= 55)
{
return 1.2;
}
else if (age <= 65)
{
return 1.8;
}
else if (age <= 70)
{
return 2.0;
}
return 0;
}
public double GetSexRating(Sex sex)
{
double sexRating = 0;
switch (sex)
{
case Sex.Male:
sexRating = 1.2;
break;
case Sex.Female:
sexRating = 0.9;
break;
}
return sexRating;
}
public double GetDestinationRating(Destination destination)
{
double destinationRating = 0;
switch (destination)
{
case Destination.UK:
destinationRating = 0.6;
break;
case Destination.Europe:
destinationRating = 1.0;
break;
case Destination.Worldwide:
destinationRating = 1.4;
break;
}
return destinationRating;
}
public double GetTravelPeriodRating(int days)
{
if (days <= 7)
{
return 0.5;
}
else if (days <= 14)
{
return 0.9;
}
else if (days <= 30)
{
return 1.2;
}
return 0;
}
public double[] GetUpdatedPremium(double premium, double rate)
{
var updatedPremium = new double[2];
updatedPremium[0] = Math.Round((premium * rate), 2);
updatedPremium[1] = Math.Round((updatedPremium[0] - premium), 2);
return updatedPremium;
}
public CustomerPremium GetPremium(Customer customer, out string reason)
{
var customerPremium = new CustomerPremium();
customerPremium.Base = GetBasePremium(customer.TripType);
var ageRating = GetAgeRating(customer.Age);
if (ageRating == 0)
{
reason = "Age";
return null;
}
customerPremium.Age = GetUpdatedPremium(customerPremium.Base, ageRating);
var sexRating = GetSexRating(customer.Sex);
customerPremium.Sex = GetUpdatedPremium(customerPremium.Age[0], sexRating);
var destinationRating = GetDestinationRating(customer.Destination);
customerPremium.Destination = GetUpdatedPremium(customerPremium.Sex[0], destinationRating);
var travelPeriodRating = GetTravelPeriodRating(customer.TravelPeriod);
if (travelPeriodRating == 0)
{
reason = "TravelPeriod";
return null;
}
customerPremium.TravelPeriod = GetUpdatedPremium(customerPremium.Destination[0], travelPeriodRating);
customerPremium.Tax = GetUpdatedPremium(customerPremium.TravelPeriod[0], 1.05);
customerPremium.Total = customerPremium.Tax[0];
reason = string.Empty;
return customerPremium;
}
}
}
There are total 2 couples and a son. Grandfather and Grand
mother, their son and his wife and again their son. So total
5 people.
Grandfather, Grandmother
|
|
Son, wife
|
|
Son
8, 13, 21, 32, 47, 63, 83
47 is answer by consecutive adding of
8+5=13
13+8=21
21+11=32
32+14=46
46+17=63
A. application software