a. Explain the following terms in the context of programming. (3 Marks) i. Program ii. Programming language iii. Programming paradigm b. Distinguish between syntax of a language and semantics of a language. (2 Marks) c. Describe the role of the following elements of an imperative programming language. (3 Marks) i. Declarative statements ii. Imperative statements iii. Program flow control statements d. In the program fragment shown below categorize each of the statements to the appropriate element in (c) above justifying your choice. (6 Marks) int factorial = 1; int argument =7; int counter = 1; while (counter <= argument){ factorial = factorial*counter; counter++; } e. Construct a comprehensive class diagram to depict the objects and relationships described below relating to a publishing house. (10 Marks) ? If two or more authors are under-taking the auditing same book, each author may get a different royalty percentage ? An author may have more than one book published and for each book, the royalty fee can differ ? Each book is edited by one or two editors, and the publisher may use in house editors on salary, or pay freelance editors a flat fee. f. Illustrate the main difference between imperative programming and functional programming by writing a definition of function factorial for each of the two paradigms. Where; factorial (n)=n x (n-1) x (n-2) x ……. x3 x2 x1; factorial (1)=1 and factorial (0)= 1 (6 Marks)
For a custom-written paper on the above topic, place your order now!
What We Offer
• On-time delivery guarantee
• PhD-level professionals
• Automatic plagiarism check
• 100% money-back guarantee
• 100% Privacy and Confidentiality
• High Quality custom-written papers