0% found this document useful (0 votes)
45 views

HP Summer Training 2012 (NOIDA) Batch: Dot NET: Online Assignment

This document provides specifications for a coding assignment to analyze customer data for a parlour shop. The program must take a string as input with customer arrival and departure letters and count how many customers got serviced and how many did not. For example, an input of "A B C D A E F G H B C D E I J F G H" would output "Customer Got Serviced = 8, Customer Not Got Serviced = 2" as there are only 3 professionals and some customers had to wait for others to depart before being serviced. The program class must have a CutomerCount method that returns a string with the counts, and main calls this method and prints the results.

Uploaded by

Hemi Angelic
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
45 views

HP Summer Training 2012 (NOIDA) Batch: Dot NET: Online Assignment

This document provides specifications for a coding assignment to analyze customer data for a parlour shop. The program must take a string as input with customer arrival and departure letters and count how many customers got serviced and how many did not. For example, an input of "A B C D A E F G H B C D E I J F G H" would output "Customer Got Serviced = 8, Customer Not Got Serviced = 2" as there are only 3 professionals and some customers had to wait for others to depart before being serviced. The program class must have a CutomerCount method that returns a string with the counts, and main calls this method and prints the results.

Uploaded by

Hemi Angelic
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

HP Summer Training 2012(NOIDA) Batch : Dot NET

Online Assignment
A parlour shop have three professionals to service their customers but customers frequency is quite higher. This application is required for them to analyze how many customers are returned without being serviced by shop and how many has got service.

Input/Output Specification
Input Specs

Your program must input a string from user that provides you the input details. Input is a string that gives you details about customers who comes and go out.

Sample Input:
string customersDetails= ABCDAEFBGHCIJKDEF

Here input string represents customer arrival and departure for example in this list in an alphabets comes that means customer arrived and if the same ABCDA says that A has arrived first and then B and then C and then D and alphabet comes again that means customer departed for example input after that A departed. As we know there are only three professionals thats why

only A,B,C can only get service and D have to wait and D Can only get service after someone in A,B or C has departed. And on this basis we are required to count how many customers got service and how many did not get service. for example

if a user input is

A B C D A E F G H B C D E I J F G H Then answer should be Customer Got Serviced = 8

Customer Not Got Serviced = 2 *A customer is counted as serviced when customer is out of the parlour if a customer is not out of parlour then it counted as not serviced.

Coding Specification class ParlourShop {

//method to find serviced and non-serviced customer.


public static string CutomerCount(string customerDetails) { int serviced = 0; int nonserviced=0 string output;

// Your code here

return output; } public static void main(string [] args) { string customerDetails;

//Code here for user input in string


string result = CutomerCount( customerDetais); int serviced=Convert.ToInt32(result[0]); int nonserviced=Convert.ToInt32(result[1]); Console.WriteLine(Serviced + serviced); Console.WriteLine(Non Serviced + nonserviced); } }
*CountCustomer Method will return a string which first character will have serviced customer count and second character will have nonserviced count. *You program should not raise exception and variable name should be meaningful.

You might also like