Intro to Software Systems Assignment 1




5/5 - (2 votes)

CSCI-C212/A592 – Intro to Software Systems

Assignment 1

• We have reviewed the related material in class, specifically about:
o Classes
o Constructors
o Instantiating Objects
• Reading material on these topics that supplement the lecture slides can be found here
• The following Sections from the link above in the Java Tutorials will be particularly
o The Sections Under Classes
o Creating Objects
Part 1:
• Two template classes have been provided. A Fraction Class and a Point Class
• It is noted in the Fraction file, but it is not a requirement to keep the Fractions Simplified
• Complete the methods that are not implemented (labeled TO-DO inside the method)
• The templates provide a lot of comments and guidance
• Submit the updated Point and Fraction classes on Canavs
Part 2:
• Create a new class called PrintingSymbol (and also write an accompanying test program)
that includes the following functionality:
o Prompt the user to enter “number of lines to print”, “the number of symbols to
print” and the “symbol to print”. (Note: Number of lines should be an odd
number greater than 7 and number of symbols per line should be between 25
and 50. Also, the symbol allowed are the ones with ASCII values between 33 (!)
and 47 (/). If user enters incorrect values, prompt the user to enter the correct
value again). For example: User enters 9 lines, 33 symbols and * included.
o Using the above example, display 9 lines with 33 asterisk per line. Note: Each
new line should be shifted right by a tab amount. You must use loops!
o Hint: The first line will be shifted one tab to the right, second will be shifted 2
tabs to the right and so on …. See sample run below.
• Submit the new class and test program on Canvas
Enter Lines to display: 9
Enter the number of Symbols per Line: 25
Enter the Symbol to print: *