Answer:
In Java:
import java.util.*;
public class Main{
public static void main(String[] args) {
Scanner input = new Scanner(System.in);
String isbn;
System.out.print("First 1:2 digits: ");
isbn = input.nextLine();
if(isbn.length()==12){
int chksum = 0;
for(int i = 0; i<12;i++){
if((i+1)%2==0){ chksum+= 3 * Character.getNumericValue(isbn.charAt(i)); }
else{ chksum+=Character.getNumericValue(isbn.charAt(i)); } }
chksum%=10;
chksum=10-chksum;
if(chksum==10){
System.out.print("The ISBN-13 number is "+isbn+"0");}
else{
System.out.print("The ISBN-13 number is "+isbn+""+chksum); } }
else{
System.out.print("Invalid Input");
} }}
Explanation:
See attachment for explanation where comments are used to explain each line
Answer:
A goal of procedural programming
An advantage of object oriented programming
A disadvantage of object oriented programming
A drawback of procedural programming
Answer:
The audience development technique that best describe the process Nicolal wants to implement is;
C Pull technology
Explanation:
Pull technology is a form of network mode of communication in which the initial data request comes from the client side of the network for it to be handled by the server side of the network.
Given that Nicola wants a demand-based content to his website for customers to access information when they wish to, the process is similar t the podcasting in which each new content is posted to a specific RSS feed from where it can be requested by a mobile app, directory or a RSS feed reader
The counter technology is a push technology where the servers push content to intended clients, such as for an incoming call, instant messaging, synchronous conferencing (online c h a t) and files.
Answer:
toString is right Answer
Explanation:
If you want to represent any object as a string, toString() method comes into existence.
The toString() method returns the string representation of the object.
If you print any object, java compiler internally invokes the toString() method on the object. So overriding the toString() method, returns the desired output, it can be the state of an object etc. depends on your implementation.