Premium Essay

Cmis 102, Hw Week 3

In:

Submitted By uakova
Words 712
Pages 3
Week 3 Homework for CMIS 102.

* Program description:
This program will calculate the total price of a laptop computer system. The program will ask the user to enter the desired CPU speed, RAM amount, Hard Drive and Monitor Size. The program use these values to calculate and then print the price of a computer system. The design step will include both pseudocode and flow chart visualization.

* Analysis:
I will use sequential and selection programming statements.
I will define 1 float number for CPU and 4 integers for the RAM(random access memory), Hard Drive, Display and Price : CPU, RAM, HD, Monitor, Price. I will be using selection statements (If- then) to find out CPU, RAM, HD and Monitor variable option and price. For example if we have:
Two HD Options: 250GB ($50) and 500GB($ 100)
Two RAM Options: 4GB($ 100) and 8GB( $150)
Two Display Options: 13 Inch Retna($150) and 15 inch ($250)
Two CPU options: 2.7GHz ($900) and 2.9GHz ($1000)
The selection statement will be of this form:

//Input CPU if (CPU == 2.7) then * set price = 900 * if (CPU == 2.9) then set price = 1000

We will repeat this process for every each of our variables, since we have only a few options it should not take much time. Otherwise we will have to group some of our options. The next step will be to find out the total Price of our selected laptop computer system by simple adding all variable and Print our computer Price.

Price = CPU+ RAM+HD+ Display; printf (“Price of laptop computer is :%d, \n” , Price);

Test Plan:
To verify this program is working properly the following variables will be used for testing:

Test Case | Input | Expected Output | 1 | CPU Option 1 (2.7GHz, $900)RAM Option 1 (4 GB, $100)HD Option 1 (250 GB, $50)Display Option 2 (15 inch, $250)Total Price would be CPU+RAM+ HD+ Display Size | Total Price = $1300 | 2 |

Similar Documents

Free Essay

Concrete

...AS 3600—2009 AS 3600—2009 Australian Standard® Concrete structures Accessed by NEWCREST MINING LIMITED on 14 Jul 2010 This Australian Standard® was prepared by Committee BD-002, Concrete Structures. It was approved on behalf of the Council of Standards Australia on 8 October 2009. This Standard was published on 23 December 2009. The following are represented on Committee BD-002: • • • • • • • • • • • • • • • • AUSTROADS Association of Consulting Engineers Australia Australian Building Codes Board Bureau of Steel Manufacturers of Australia Cement Concrete & Aggregates Australia—Cement Cement Concrete & Aggregates Australia—Concrete Concrete Institute of Australia Engineers Australia La Trobe University Master Builders Australia National Precast Concrete Association Australia Steel Reinforcement Institute of Australia University of Adelaide University of Melbourne University of New South Wales University of Western Sydney This Standard was issued in draft form for comment as DR 05252. Standards Australia wishes to acknowledge the participation of the expert individuals that contributed to the development of this Standard through their representation on the Committee and through the public comment period. Keeping Standards up-to-date Accessed by NEWCREST MINING LIMITED on 14 Jul 2010 Australian Standards® are living documents that reflect progress in science, technology and systems. To maintain their currency, all Standards are periodically reviewed, and...

Words: 70634 - Pages: 283

Premium Essay

Work, Culture and Identity in Mozambique and Southafrica 1860-1910

...Acknowledgments ix Acknowledgments This book owes a great deal to the mental energy of several generations of scholars. As an undergraduate at the University of Cape Town, Francis Wilson made me aware of the importance of migrant labour and Robin Hallett inspired me, and a generation of students, to study the African past. At the School of Oriental and African Studies in London I was fortunate enough to have David Birmingham as a thesis supervisor. I hope that some of his knowledge and understanding of Lusophone Africa has found its way into this book. I owe an equal debt to Shula Marks who, over the years, has provided me with criticism and inspiration. In the United States I learnt a great deal from ]eanne Penvenne, Marcia Wright and, especially, Leroy Vail. In Switzerland I benefitted from the friendship and assistance of Laurent Monier of the IUED in Geneva, Francois Iecquier of the University of Lausanne and Mariette Ouwerhand of the dépurtement évangélrlyue (the former Swiss Mission). In South Africa, Patricia Davison of the South African Museum introduced me to material culture and made me aware of the richness of difference; the late Monica Wilson taught me the fundamentals of anthropology and Andrew Spiegel and Robert Thornton struggled to keep me abreast of changes in the discipline; Sue Newton-King and Nigel Penn brought shafts of light from the eighteenthcentury to bear on early industrialism. Charles van Onselen laid a major part of the intellectual foundations on...

Words: 178350 - Pages: 714