Create an interface displaycharacters

Assignment Help Programming Languages
Reference no: EM131325194

Programming tasks

While working on the tasks below, you are free to request assistance on D2L at:

Communications / Discussions / Assignments (or other appropriate sub-topic)

These tasks entail modifying your prior code for Shape.java.

1. Modify your code so that the switch statement entails cases that call separate shape generating methods. Now, the methods must be members of separate classes - Square, Triangle, Diamond - that descend from the abstract class Shape. All code is still to be in a single java file.

2. Within your code, demonstrate the use of these method concepts (to get credit, make sure your comments indicate each one.):

• overloading some class method (not constructor)
• accessor (getter)
• mutator (setter)
• constructor overloading

3. Create an interface DisplayCharacters and another class ShapeCharacter. ShapeCharacter contains a method for displaying either the default alphabet or the user's selected character to comprise a shape. Keeping with object oriented principles, the ShapeCharacter class is distinct from the Shape class, so Shape can only make use of ShapeCharacter's display method if ShapeCharacter implements an interface. Consider that implementing an interface is not the same as using it in the client.

4. Have the default characters in #3 be random by using an instance of the Random class. You will need to do some research. See https://docs.oracle.com/javase/ 8 /docs/api/java/util/Random.html

The default characters should be a random selection of the alphabet, both upper and lower case letter.

Your score depends on several tasks.

Compiling / Running:

1. The program compiles without error, runs and pertains to this final project.

The following numbered items are 3.33% each and total 90% (They may be combined):

Documentation:

2. Name of program, author, purpose/description, date, any special instructions for user about compiling and running.

3. Throughout the code, comments and/or relevant component names should attempt to make the program understandable.

4. Explain use of access modifiers (public, private, ...) for your methods and variables.

5. Comments to labels each task below (for example: // item #4 ).

6. Indicate where at least one case of "encapsulation" occurs and explain what it means to your program.

User input:

7. User input and/or control (can be in applet or system terminal - command-line)

Output:

8. Display graphic output: program generates at least 3 designs (can be in either applet or character art in the system terminal)

Object oriented programming:

9. At least 1 parent shape class

10. At least 3 shape child classes

11. Distinct class for driver/controller

12. Create an interface, implement it and use it

13. Overloading of method of one class (created by you) in another class

14. Overloading of constructor of class (created by you)

15. Accessor

16. Mutator.

Reference no: EM131325194

Questions Cloud

What is the net profitability effect on the mexican firm : What is the net profitability effect on the Mexican firm? What international market concept is demonstrated in this example? Discuss the risks associated with changing exchange rates and international commerce and provide a scenario demonstrating ..
Design program that will serve as database for keeping track : You are to design a program that will serve as a database for keeping track of video games and various statistics for the games. This application will allow for the storing of the name of a video game.
What is assessment as to firms degree of economic exposure : What is your assessment as to the firm's degree of economic exposure? Assume that the RUD and the BTD move in tandem against the US$.
How does physician behaviors impact the nurse viewpoint : How does physician behaviors impact the nurse viewpoint about the work environment - Have any of you heard the old saying if you love what you do, you will never work a day in your life?in 150 words minimum including in text citation and reference
Create an interface displaycharacters : Create an interface DisplayCharacters and another class ShapeCharacter. ShapeCharacter contains a method for displaying either the default alphabet or the user's selected character to comprise a shape.
Discuss the relationships among ksas : Discuss the relationships among KSAs (knowledge, skills, and abilities), job analysis, organizational strategy, and HR activities. What are the KSAs needed by the firm to achieve the strategy and what KSAs are currently resident? How does the firm..
Identification and explanation of the key internal structure : Identification and explanation of the key internal structures (at least 3) that will be designed to enhance the culture within your organization
How does research benefit business professionals : How does research benefit business professionals? How can your business research and report writing continue to develop in terms of fast-paced change on the Internet and other new technologies
Estimate the average daily ridership for 2006 and 2007 : It is estimated, however, that the price elasticity will change to -1.2 when parking rates increase to $2.50. Using these data, estimate the average daily ridership for 2006 and 2007.

Reviews

Write a Review

Programming Languages Questions & Answers

  How the app may lead to a career in mobile technology

CP3307/CP5307 Coding Project Specification - Discuss the design, implementation, and testing of your app - how to rotate and move the blocks so the picture is correctly formed.

  Functions of standard and statistical calculators

Write a windows application in Visual Basic to perform functions of standard and statistical calculators.

  Class to create and draw five squares

Now write applet DrawSquares that uses your Square class to design and draw 5 squares. This code must be very simple.

  Design this program using an algorithm of your choice

Design this program using an algorithm of your choice, draw the flowchart and convert the flowchart into a C++ Program.

  Implement effective security training

What are the four target audiences that the companys new system security policy must reach and  Discuss a few of the 7 necessary steps to implement effective security training.

  Write a program sequence that places the value in address

Write a program sequence that places the value in Address $1000 into Accumulator A and places the value in Address $1001 in Accumulator B. Then, add these values together and store the result in Location $1002.

  Write shell script to determine whether given file exist

Write shell script to determine whether given file exist or not, file name is supplied as command line argument, also check for sufficient number of command line argument

  Compute the product xy

Given two integers X and Y compute the product XY (multiplication), the quotient X=Y (integer division), and the modulus X (mod Y) (remainder).

  Identify all the pure-strategy nash equilibria of game

Identify all of the pure-strategy Nash Equilibria of this game. Identify at least one mixed-strategy Nash Equilibrium, and show that it is a Nash Equilibrium.

  Write one instruction to reverse the lsb

write ONE instruction to reverse the LSB of the 2nd and 3rd elements of arr - Write code to determine if a data value is a power of 2,

  What is the difference between realloc

What is the Difference between realloc() and free() in C++?

  Prepare function for one integer parameter-returns integer

Prepare the C++ function which needs one integer parameter and returns the integer value. Function will double value passed to it and return doubled value.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd