Questions: 1 835

Answers by our Experts: 1 539

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Search & Filtering

Manish has developed the code for the same. The requirement is given below. You need to review the code, find out any issues / bugs with the code and correct the same. Also you need to develop a Console based Client application for the same requirement. The Client application should allow Adding new Employee’s of specified type, Searching Records, Delete Records and View all records operations.


Problem Statement: XYZ computer Systems PVT Ltd. wants to develop an application to maintain employee details. You have to develop a .NET Application to accept new employee details and store the details in a Collection.


steps:


Task 1: Create a private DLL with a class Called Employee. Employee class will have Employee Number, Name and Basic Salary, and PF attributes. Define appropriate properties to access the attributes. Write 2 constructors, one default & one parameterized, to assign the values of the attributes when the object is created.


Task 2: Use List<Employee>collection.


Create a console application to accept Product Details like ProductNo, Name, Rate and Stock.

[Use Array List Collection]

Display the Menu to perform the following:

================

a. Adding New Product

b. Deleting Currently Searched Product

c. Searching Product

Searching will work as shown below:

• User will enter ProductNo.

• If the product with that productno exists in Collection, then the details should be shown, otherwise show appropriate message.


d. Save the New Product – The products should get saved in the sorted order of ProductNo. 


You need to maintain a Contact List in a generic List Collection. You need to perform the following tasks: i. AddContact() – To add contact detail to List

ii. DisplayContact() – To display particular contact detail from List

iii. EditContact() – To modiy particular contact detail from List

iv. ShowAllContacts() – To display all contact details from List


Task 1: Create the Contact class with the following properties:

public int ContactNo{get;set;}

public string ContactName{get;set;}

public string CellNo{get;set;}

Task 2: Create a Console application and write the Code for the required functionality mentioned above.


Hint: a. There is a loop in Main() function which accepts the selection option

b. There are additional 4 static functions to perform required tasks which are called based on selection c. Use the List generic collection to maintain the list.


Create ProductMock Entity which throws DataEntryException when its properties initialize with following values. Get the Product details from the user and handle in-built and user defined exception. Refer the class diagram given below :


Condition | Exception Message

__________________________________________________________________________________

productID <=0 | Product ID must be greater than zero productName = = “” | Product Name cannot be left blank

price <=0 | Price of product must be greater than zero.

productName | Product Name should have alphabets and numbers only


Product Mock:

ProductId: int

ProductName: String

Price: Double


Output:

Enter Id: -32

Enter Product Name: Compaq Laptop

Enter Price: 32000


Product Id must be greater than 0


ABC Corp wants to maintain list of Customers. While accepting the data, you need to validate CreditLimit property. If the value is invalid, you need to raise Exception. We need to implement custom exception class to implement the same.


Task 1: Define a Customer class with following members CustomerId, Customer Name, Address, City, Phone, CreditLimit


Task 2: Define the properties for all these members.


Task 3: Define two constructors (Default and Parameterised) to assign the values.


Task 4: You need to validate the CreditLimit. If the value is above 50000, then you need to raise Exception to handle this. Create InvalidCreditLimit custom Exception class to achieve the same.


Task 5: Use the Exception class created to throw the exception. Ensure that the Client application catches the exception and handles the error properly.


There is a Change request from the customer. It is as follows: You need to calculate Interest paid by banks on Saving Account.


Task 1 : Add a function declaration “void CalculateInterest()” in the interface. Define the functions in the concrete classes such as ICICI accounts get 7% interest and HSBC gives 5% interest.


The purpose is to create Circle and Triangle class by inheriting the Shape Class. Both the inherited classes should override the WhoamI() method of the Shape Class. The code has some bugs. Identify the Bugs and fix them.


public class Shape

{

private void WhoamI()

{

Console.WriteLine("I m Shape");

}

}

class Triangle : public Shape

{

public virtual void WhoamI()

{

Console.WriteLine("I m Triangle");

}

}

public class Circle : public Shape

{

void WhoamI()

{

Console.WriteLine("I m Circle");

}

}

class Program

{

static void Main(string[] args)

{

Shape s; s = new Triangle();

s.WhoamI();

s = new Circle();

s.WhoamI();

Console.ReadKey();

}

}


Create Supplier instance in SupplierTest class, invoke AcceptDetails method to accept the details of the supplier from the user and invoke DisplayDetails method to display the given details of the supplier.


Supplier:

Supplierid: int

SupplierName:

City: String

PhoneNum: String

Email: String

____________________

+Accept Details(Supplier): Void

+Display Details: Supplier



String Supplier Test

_________________

+Main(String[] args)


Define a single dimension array of strings to hold the name of City. Accept some values from the user and store them in the array. Use foreach loop to print all the data of the array. 


 Create a Class named BooksDemo accepts and displays the details of books using multidimensional array.

BooksDemo

-colName:string[4] = {"BookTitle", "Author", "Publisher", "Price"}

-bookDetails: string[2,4]

+Main(args: string[])


LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS