ADVERTISEMENT

One of the works done by our Robotics and Machine Learning division,
SELF-LEVELING QUADCOPTER
Arduino based Quadcopter.
Self-leveling is acheived by the aligning the quadcopter using the readings from the gryo as well as the accelerometer.
A four channel RC transmitter is used to control the movement of the quadcopter when in flight. Kindly subscribe to our YouTube Channel and stay tuned.

Tuesday 26 April 2016

CSE1002:PP7:SOLAR

UML:





CODE:


void bag::get()
{
cin>>name>>num_Of_Items;
for(int i=0;i<num_Of_Items;i++)
 cin>>item_Wt[i]>>item_Count[i];
}
void bag::print()
{cout<<name<<endl;}
float bag::compute()
{float f;
for(int i=0;i<num_Of_Items;i++)
 f+=item_Wt[i]*item_Count[i];
return f;
}
bool wayToSort(int i,int j)
{return true;}
void solar::get()
{
cin>>num_Bags;
bag temp;
for(int i=0;i<num_Bags;i++)
{
 temp.get();
 m1[temp.compute()]=temp;
 v.push_back(temp.compute());
}
}
void solar::sort_Vec()
{sort(v.rbegin(),v.rend());}
void solar::print_In_Order()
{
for(int i=0;i<v.size();i++)
 m1[v[i]].print();
}

No comments:

Post a Comment