Click here to Skip to main content
15,894,312 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,
for the code given below, what does it mean " populate object 'objRes' ? " what is the meaning of populating an object ?

public OrderResponse getOrederRequest(Order objOrderReq)
{
OrderResponse objRes = new OrderResponse();
return objRes ;

}
Posted

1 solution

Where does it say that ?

I suggest you buy a very basic book, or if you have one, read it. If you're taking a class, go and talk to the teacher.


jazy_smith wrote:
OrderResponse objRes = new OrderResponse();


This creates an OrderResponse, which is then returned. This method right now is useless. Please tell me that you're not asking a question about paid work. I assume this is a class, which is why you are asking such a basic question, however I don't see how a class could give you this code and ask you to do this task, and I can see how a job would.

Anyhow, populating an object means setting it's values. The method you have now is a waste of time, I assume it is supposed to fill values in the OrderResponse object, using values in the Order object. If this code was well written, the OrderResponse object would have a constructor that took an Order, and populated itself.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900