Strings in Java :Java Programming: Solving Problems with Software (Java Programming and Software Engineering Fundamentals Specialization) Answers 2025
1. What is the video for the second YouTube link?
-
Potatoes ❌
-
STEM ❌
-
Turkeys, Ducks and Quails ✔️
-
Walt Disney cartoons ❌
Summary:
The second YouTube link on the webpage points to a video about Turkeys, Ducks and Quails.
2. What does the mystery method do?
-
First three T’s replaced with two T’s ❌
-
All T’s removed ❌
-
Each T replaced with two T’s ❌
-
Three copies of the string ❌
-
The first three T’s are removed ✔️
Summary:
The method finds the first 3 “T” characters and skips/removes them from the returned string.
3. How many genes are in this file?
✔️ 69
Summary:
The code finds 69 valid genes in the DNA file.
4. How many genes are longer than 60?
✔️ 23
Summary:
Out of 69 total genes, 23 have length > 60.
5. How many genes have cgRatio > 0.35?
✔️ 40
Summary:
40 genes have a CG ratio greater than 0.35.
6. How many times does the codon CTG appear?
✔️ 224
Summary:
The codon “CTG” occurs 224 times in the entire DNA strand.
7. What is the length of the longest gene?
✔️ 489
✅ Summary Table
| Question | Final Answer | Summary |
|---|---|---|
| 1. Second YouTube video topic | ✔️ Turkeys, Ducks and Quails | The second YouTube link points to a video about Turkeys, Ducks and Quails. |
| 2. What does the mystery method do? | ✔️ Removes first three T’s | The method finds and removes the first 3 occurrences of “T” in the string. |
| 3. Total genes in file | ✔️ 69 | 69 genes are detected from the DNA sequence. |
| 4. Genes longer than 60 | ✔️ 23 | 23 of the 69 genes have length greater than 60. |
| 5. Genes with cgRatio > 0.35 | ✔️ 40 | 40 genes have a CG ratio above 0.35. |
| 6. CTG codon count | ✔️ 224 | The codon CTG appears 224 times in the DNA strand. |
| 7. Longest gene length | ✔️ 489 | The longest gene found is 489 bases long. |