Answer:
See attached file for complete detailed code.
Explanation:
See attached file.
import java.util.Scanner;
public class JavaApplication70 {
public static void main(String[] args) {
Scanner scan = new Scanner(System.in);
System.out.println("Input a String:");
String txt = scan.nextLine();
System.out.println("Input an integer:");
int num = scan.nextInt();
String newTxt = "";
int w = 0;
for (int i = txt.length()-1; i >= 0; i--){
char c = txt.charAt(i);
while (w < num){
newTxt += c;
w++;
}
w = 0;
}
System.out.println(newTxt);
}
}
I hope this helps!
Answer:
A. the museum can choose a heuristic approach which will achieve a lossless compression, but they cannot be sure that it is the most efficient compression for each image
C. algorithms for lossless compression exist, so the museum can use those to compress the image
Explanation: