Subjects
PRICING
COURSES
SIGN IN
Start Free Trial
Nate R.
3rd year college student, experience with Linux administration
Tutor Satisfaction Guarantee
Java Programming
TutorMe
Question:

Given a class named Student with 3 instance variables (name, studentID, and birthDay) make a constructor that accepts a string and 2 ints and initializes the instance variables.

Nate R.
Answer:

public Student (String name, int id, int DOB) { this.name = name; //using this.name tells the compiler to use the instance variable instead of the parameter studentID = id; birthDay = DOB; // these I don't need to use 'this' because the variable names are different }

Pre-Algebra
TutorMe
Question:

factor the given trinomial (x^2 means x squared) 4x^2 - 14x + 12

Nate R.
Answer:

(2x - 4) (2x - 3)

C Programming
TutorMe
Question:

How do you read input from a file in C? using this how would you read a string as name and an int as the value from a text file named 'file'?

Nate R.
Answer:

make a file pointer and use fscanf() to read from a file given a file pointer, format to read and variables to store into int value; char name[10]; File * filePointer; filePointer = fopen ("file.txt", "r"); fscanf( filePointer, "%s %d", name, &value);

Send a message explaining your
needs and Nate will reply soon.
Contact Nate
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.