A college student chose to drop out of school because his class project was successful - in fact, so successful that it became a company that rakes in $21 million and helps kids battling with cancer.

Zachary Quinn was a sophomore at the University of St. Thomas in St. Paul, Minnesota when he had an entrepreneurship class project, CNBC reported. The project, Love Your Melon, became so successful that he ended up dropping out of school to focus on it.

Love Your Melon, which Quinn co-founded with his friend Brian Keller, began as a simple project: Quinn and Keller sold hats through a "buy one give one" model. For every hat sold, one hat is given to a child with cancer. They started in 2012, setting up table in front of Quinn's parents' restaurant, and peddling hats to passersby.

Surprisingly, the business boomed. After selling 200 hats, Quinn thought that they had "something big." True enough, the business made $61,000 in sales in its first year. Now, they were able to sell so many hats that they already have more hats to give than the number of kids they will give to across the nation.

According to the National Cancer Institute, there was an estimated 15,780 children diagnosed with cancer in the U.S. in 2014. As of January 2010, there is an approximated 380,000 survivors of childhood during childhood and adolescence.

Love Your Melon, which has 11 employees, brought in $21 million in revenue this year. It is hoping to reach $50-60 million in revenue next year. The company sells its items online, and also sells apparel in select boutique retailers across the country. All items are made in the U.S.

In the past four years, Quinn's company has donated about $1.5 million to fund cancer research initiatives. This amount is half of the company's profits. By the end of this year, Quinn expects the company to have donated about $2.5 million.