Solved

Shapes In Eiffel

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
error when i compile 5 627
Java Help 2 84
Best IDE for PHP starters 11 122
egit plugin on eclipse 8 62
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: …
The viewer will learn how to synchronize PHP projects with a remote server in NetBeans IDE 8.0 for Windows.
The viewer will learn how to use and create new code templates in NetBeans IDE 8.0 for Windows.

813 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now