Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Shapes In Eiffel

Posted on 2003-11-16
2
Medium Priority
?
1,414 Views
Last Modified: 2013-12-03
hello,

i have to create a program to Eiffel that ask the user to enter for an odd  integer and
then create a  rhombus shape using * (with out any libraries ) and using onlly loop + if commands

like that

if number is 3

   *
 ***
   *

if the number is 5

    *
  ***
*****
  ***
    *

if the number is 7

       *
     ***
   *****
 *******
    *****
      ***
        *

and so on....

can you help me pls

0
Comment
Question by:superap
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 1

Accepted Solution

by:
bearware earned 1000 total points
ID: 9831963
Sounds like homework. So here are some clues.

How many wide is each shape.
How high is each shape.

How does the number of stars change on each line (just do the top part first when its working add the bottom part)
How many spaces before the start. (do spaces as # get this working before adding stars, changes # to space when it all works)

Write a sceliton for the draw_rombus routine, write a requires clause for it. (answer is in the question)
In you class have a feature number_of_line_output : INTEGER
Write an ensure for draw_rombus that uses number_of_line_output
Write a feature that outputs one line. Write an ensures clause for that feature.

P.S. your question is not O.S. spacific

If you get stuck I may add more clues/
0
 

Author Comment

by:superap
ID: 9834517
A BIG BIG THX!!!!!

the phrase "How does the number of stars change on each line" is the solution!!!

thx again
!!


0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In our object-oriented world the class is a minimal unit, a brick for constructing our applications. It is an abstraction and we know well how to use it. In well-designed software we are not usually interested in knowing how objects look in memory. …
Here is a helpful source code for C++ Builder programmers that allows you to manage and manipulate HTML content from C++ code, while also handling HTML events like onclick, onmouseover, ... Some objects defined and used in this source include: …
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.
Suggested Courses

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question