This book was written during the Cold War Era environment. Some characters are predictable or are portrayed as such so we can see how different people face or do not face the inevitable. Even those characters that change easily through some sort of epiphany can be predictable. The basic story in the book is that Albania sends a plan with a major country's markings and we retaliate. In the movie they changed it to some hotshot getting trigger-happy with a weapon that could only cause assured destruction. However the book not a pacifist (don't build bombs story). It could be a speculative fiction or just speculative.
Again the book On the Beach as most books is more complete in the characterization and description of the story. One the people is a cross of characters. The captain, Dwight Towers, is well trained and loyal to the U.S. to the end. He takes the sub out to international waters, as Australia is an ally, but not the U.S. Moira Davidson realizes that Dwight is married and helps him buy a pogo stick for the kid. She also decides to make something of herself by going to secretarial school. Others plan for next year.
The movie On the Beach (1959) stays fairly loyal to the feel, with a few minor changes. Some of the changes were necessary due to the difference in media. However others were a little distracting. They used major stars that overshadowed the character that they were playing. Ava Gardner was just a tad old for the part of Moira Davidson. However the movie still let the characters be real and predictable. Such as Dwight Towers, loyal to the U.S. takes his crew back to the US (not quite the book but still loyal to this command).
It is worth re-wathcing. But defiantly read the book.