What is a patent?
Specific details vary by country but the general principles are close enough that it doesn't matter which laws we look at. From the Patents Act 1990:
13 Exclusive rights given by patent
(1) Subject to this Act, a patent gives the patentee the exclusive rights, during the term of the patent, to exploit the invention and to authorise another person to exploit the invention.
(2) The exclusive rights are personal property and are capable of assignment and of devolution by law.
(3) A patent has effect throughout the patent area.
15 Who may be granted a patent?
(1) Subject to this Act, a patent for an invention may only be granted to a person who:
(a) is the inventor; or
(b) would, on the grant of a patent for the invention, be entitled to have the patent assigned to the person; or
(c) derives title to the invention from the inventor or a person mentioned in paragraph (b); or
(d) is the legal representative of a deceased person mentioned in paragraph (a), (b) or (c).
55 Documents open to public inspection
(1) Where a notice is published under section 54 or under subsection 62(3), the specification concerned, and such other documents (if any) as are prescribed, are open to public inspection.
(2) Where a notice is published under paragraph 49(5)(b) in relation to an application for a standard patent, or under subsection 62(2) in relation to the grant of an innovation patent, the following documents are open to public inspection:
(a) all documents (other than prescribed documents) filed in relation to the application or the patent, whether before or after the acceptance or grant;
(b) all documents (other than prescribed documents) filed, after the patent ceases, expires or is revoked, in relation to the former patent;
(c) copies of all documents relating to the application or patent (other than prescribed documents) given by the Commissioner to the applicant or patentee, or the former applicant or patentee;
being documents that have not already become open to public inspection.
As an employee of A, any intellectual property Josh creates in the course of his employment is legally the property of A. This distinction can be important: if Josh is employed as a truck driver by the post office and his patent is for a new mining technique then that is clearly not in the course of his employment, however, if he were a mining engineer employed by BHP-Billiton it clearly is. We don't know what Josh's job was or what the patents are for but it is clear that he was set to work on them by his employer and that they are therefore in the course of his employment.
Josh has no legal claim on the patents.
Patents are personal property like a car or television. If I choose not to use my car or television, that doesn't mean that you can. Similarly, if I choose not to use my patent, then legally you can't either unless I give you permission.
However, patents are subject to geographical limitations. An Australian patent gives exclusive rights in Australia and nowhere else. If they want protection in the United States and France and the Ukraine, they have to get patents in those countries. Further, no patents apply in outer space.
Josh is interviewed at Company B. He presents the same idea now patented by Company A. Company B loves his idea, hires him, and allows him to hire 30 others to develop his idea.
Your ethics teacher is a bit off on the law here: you can't patent an idea. A patent can only be granted for an invention "any manner of new manufacture the subject of letters patent and grant of privilege within section 6 of the Statute of Monopolies, and includes an alleged invention." An idea is not an invention - many people had the idea of being able to fly before the Wright brothers invented the aeroplane.
So, if what you have stated is what has actually happened here there are no legal issues here. The idea behind the patent is public knowledge so Josh has done nothing wrong by revealing it. Similarly, so long as Josh and company B don't infringe any of company A's patents there is no legal impediment to them exploiting the idea. To continue the example, helicopters and rockets both exploit the idea of flight but they would not infringe any hypothetical patent on aeroplanes.
Even if Josh had signed a non-disclosure agreement with A, he has not breached it. Such agreements are limited to confidential information - patent applications are public documents and are therefore not confidential.
What would be illegal is if Josh and company B exploited the patents without permission (within the geographic limits of the patent) rather than the idea that led to the patents. However, there are a number of exemptions to patent protection.
There are a lot of ethical issues involved in patents and intellectual property in general. There are also some very interesting ethical questions about the whole nature and existence of personal property.
The law is a reflection (sometimes distorted) of the ethical consensus of society. The legal implications of the question are straightforward, the ethical considerations are something else. For example, what if the patents company A refused to use were a 100% effective and safe lifetime vaccine for cancer?