Module 8 - Code design and Implementation Assignment
Once more only 1 choice to implement this module. Naming convention: Project name “surnameTask8, note only “T” in capital all else lowercase. This task must be implemented within a single file.
Fibonacci or Prime number iterator:
Design a menu driven program that performs the user’s choice of the following functions the program exit should also be a user’s choice.
Menu Item 1: Fibonacci number iterator, here you are to define an iterator class named FibonacciIterator for iterat- ing Fibonacci numbers. The constructor takes an argument that specifies the limit of the maximum (highest numerical value double) Fibonacci number. For example, prompt the user for size, use the size to call FibonacciIterator(“user input”) creates an iterator that iterates Fibonacci numbers less than or equal to “user input”. Your program then uses this iterator to display all Fibonacci numbers less than or equal to “user input” in Descending order 5 items per line (use tab stops to separate them).
Menu Item 2: Prime number iterator here you are to define an iterator class named PrimeIterator for iterating prime numbers. The constructor takes an argument that specifies the limit of the maximum (highest numer- ical value double) prime number. For example, prompt the user for size, use the size to call PrimeIt- erator(“user input”) creates an iterator that iterates prime numbers less than or equal to “user input”. Your program then uses this iterator to display all prime numbers less than or equal to “user input” in Descending order 5 items per line (use tab stops to separate them).
Menu Item 3: Exit command, this should present a report of the operations requested since the program was invoked, the total time required for each, the program start and end time, I.E.:
2 Fibonacci commands yielding 713 individual outputs requiring 0.7 + 0.6 seconds totaling 1.3 seconds. 1 Prime command yielding 27 individual outputs requiring 0.3 seconds. Program started at 21:33:00 and terminated at: 21:34:12.
Last updated: January 10, 2019 • Typeset using: texshop by: Dr S Antoun https://csc.uis.edu/faculty/santoun/
Email: santoun@uis.edu
1
DescriptionIn this final assignment, the students will demonstrate their ability to apply two ma
Path finding involves finding a path from A to B. Typically we want the path to have certain properties,such as being the shortest or to avoid going t
Develop a program to emulate a purchase transaction at a retail store. Thisprogram will have two classes, a LineItem class and a Transaction class. Th
1 Project 1 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of
1 Project 2 Introduction - the SeaPort Project series For this set of projects for the course, we wish to simulate some of the aspects of a number of