TutorMe homepage

SIGN IN

Start Free Trial

Vemula S.

I am an undergraduate at Birla Institute of Technology and Sciences, Pilani, one of the most reputed colleges in India.

Tutor Satisfaction Guarantee

Java Programming

TutorMe

Question:

Given a string argument of the form 201#5 to a constructor of a class which is used for initializing the instance variables. Here 201 represents ID and 5 represent some other instance variable. Write the constructor class assuming the following. Class name = Track Instance fields = trackID , length. Constructor Track(track : String); Track(String track){ // Complete this part } Assume all required imports are done.

Vemula S.

Answer:

Track(String track){ StringTokenizer st = new StringTokenizer(track, "#"); this.trackID = Integer.parseInt(st.nextToken()); this.lengthMin = Integer.parseInt(st.nextToken()); }

Geometry

TutorMe

Question:

ABC is a right angled triangle, right angle at A.AB = 24 and AC = 18.D is a point in between B and C S.T triangles ADB and ADC have equal perimetres. Determine the length of AD.

Vemula S.

Answer:

You can draw out the triangle on a piece of paper. Join the points connecting A and D.Now assume a variable x equals to AD and BD equals to some other variable (say y ). Now if you know the great pythagorean theorem, next part becomes simple. BC*BC = AB*AB + AC*AC BC becomes 30. Now solve for y and we get , y + x + 24 = 18 + x + 30 - y 2y = 24 -> y = 12 Now comes the cosine rule. you can read about it here -> https://en.wikipedia.org/wiki/Law_of_cosines Now using cosine rule on both triangles ABC and ABD, cos(angle) = (24*24 + 30*30 - 18*18)/(2*24*30) = (24*24 + 12*12 - x*x)/(2*24*12) Solving for x we get, x = 16.09 or 36/root(5).

C++ Programming

TutorMe

Question:

What are the differences between a C struct and a C++ struct ?

Vemula S.

Answer:

C struct is just a way of putting data together, it only has the data and does not include the functionality (other functions can use this struct anyway! ). A C++ struct is actually a class difference being class defaults to private whereas struct defaults to public.

Send a message explaining your

needs and Vemula will reply soon.

needs and Vemula will reply soon.

Contact Vemula

Ready now? Request a lesson.

Start Session

FAQs

What is a lesson?

A lesson is virtual lesson space on our platform where you and a tutor can communicate.
You'll have the option to communicate using video/audio as well as text chat.
You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.

How do I begin a lesson?

If the tutor is currently online, you can click the "Start Session" button above.
If they are offline, you can always send them a message to schedule a lesson.

Who are TutorMe tutors?

Many of our tutors are current college students or recent graduates of top-tier universities
like MIT, Harvard and USC.
TutorMe has thousands of top-quality tutors available to work with you.

Made in California

© 2018 TutorMe.com, Inc.