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

  Matlab that will use the flipping of two-sided coins to sim

Write a program in matlab that will use the flipping of two-sided coins to simulate any event that has a probability of success(Ps) that ranges between 0 and 1. The simulation will most likely be approximate. It must be accurate to at least 0.01

  Write application to simulate coin tossing

Write an application that simulates coin tossing. Let the program toss the coin each time the user presses the "Toss" button. Count the number of times each side of the coin appears.

  Programming problem

Programming Problem can be solved by a program that performs three basic tasks-Input Data, Process Data, and Output Results.

  The google corporation

HTML is governed by who? o The Google Corporation. o The Microsoft Corporation. o The American Congress.

  Create project to compute checking account balance

Create a project to compute your checking account balance. Form: Include radio buttons to indicate the type of transaction: deposit, check, or service charge.

  What is the probability that you can toss some number

What is the probability that you can toss some number, n, heads in a row? The idea here is to calculate the probability of trials that had all heads, such that a trial constitutes a set number of coin tosses.

  Advantages of separating logic from presentation

What are the advantages of separating logic from presentation? What are the differences between using the Dispatcher synchronously and asynchronously

  Draw and implement class which contains instance data

Draw and Implement the class called "Box" which contains instance data (all doubles) that represents height, width, and depth of the box. Also include boolean variable called "full" as instance.

  Create nested menus interface for a check-in hotel

Create a nested menus interface for a check-in and check-out hotel reservation system that can be used internationally. Use numbers to select a menu item.

  Write specifications for method of pre- and post-conditions

Write down specifications for method which advances any given date by one day. Write down statement of purpose, pre- and post-conditions, and description of parameters.

  What professional organizations might you join and websites

a write a 200- to 300-word short-answer response to the followingwhat professional organizations might you join and

  Write program to accept six pairs of values from user

Write a program that accepts six(6) pairs of values from the user and then calculates and stores the difference of each pair of values in an array.

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