We are not going to formally use textbooks for this course. Paying attention to what is taught in class shoud be quite sufficient, for you to learn the basics of C++ and Java.

That said, here are some good reference books for you [see below] - you do NOT need to purchase any of these! And, there are lots of good websites as well...

Texts

C++

C++ for Everyone

Practical C++ Programming

Thinking in C++, Vols 1 and 2

Java

Java: The Complete Reference

General

http://rosettacode.org/wiki/Category:Programming_Tasks : LOTS of programs, in LOTS of languages!

GeeksforGeeks: a MEGA portal for algorithms, data structures: https://www.geeksforgeeks.org/

Websites

Both C++ and Java are mature, widely-used languages, which means there are numerous pages that are devoted to teaching them, discussing issues related to them, etc. Below is a small sampler.

LearnCpp.com is an excellent site, with extremely well-written mini 'tutorials' on a huge number of C++ topics.

C++ FAQ - very thorough "go to" reference.

C++ reference - another good reference.

C++ Tutorial