This happened to me too when Chewie was around 4 months old. He would always bark and whine whenever he wanted something. Like jump in bed with me or beg for food while we're eating. I didn't want him to get used to that so I would just ignore him, or give him a firm NO. After 2 weeks he realized that barking and whining would not get him anything. He is so well behaved now. He does not bark or whine anymore. Be firm. He will get used to that if you always give him attention everytime he whines. You can do it!