Solved

Shapes In Eiffel

Posted on 2003-11-16
2
1,413 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 250 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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

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

Update (December 2011): Since this article was published, the things have changed for good for Android native developers. The Sequoyah Project (http://www.eclipse.org/sequoyah/) automates most of the tasks discussed in this article. You can even fin…
Jaspersoft Studio is a plugin for Eclipse that lets you create reports from a datasource.  In this article, we'll go over creating a report from a default template and setting up a datasource that connects to your database.
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
THe viewer will learn how to use NetBeans IDE 8.0 for Windows to perform CRUD operations on a MySql database.

617 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