Free Essay

Code to Do

In: Other Topics

Submitted By qwerty09812
Words 513
Pages 3
Conversion of decimal to hexadecimal.

You are to develop a program in C++ which converts a decimal (base 10 number) to hexadecimal (base 16). The following table defines the conversion of a decimal digit to the corresponding hexadecimal value.

|Decimal |Hexadecimal |
|0 |0 |
|1 |1 |
|2 |2 |
|3 |3 |
|4 |4 |
|5 |5 |
|6 |6 |
|7 |7 |
|8 |8 |
|9 |9 |
|10 |A |
|11 |B |
|12 |C |
|13 |D |
|14 |E |
|15 |F |

The simple algorithm to perform the conversion is to: 1. Divide the decimal by 16, record the remainder. 2. Repeat step one until the decimal number is zero. 3. Output the remainders in reverse order to give you the hexadecimal equivalent.

For example if we wish to convert decimal 520 to its hexadecimal equivalent: 1. 520 / 16 = 32 with a remainder of 8 2. 32 / 16 = 2 with a remainder of 0 3. 2 / 16 = 0 with a remainder of 2. 4. Hexadecimal value is 208

Task 1 Produce the C++ program

The documentation should contain the following elements:

1. Listing of the completed program. [P1.4, P2.1] 2. Produce appropriate user documentation which describes the operation of the program and identifies validate input data. [P3.1, P3.2] 3. Document the testing you performed to ensure the correct operation of your code. [P4,1, P4.4]

BTEC HIGHER NATIONAL IN COMPUTING

Unit 3: Software Development - H1

Assessment guidance

Outcomes | |To achieve a pass grade the evidence must show that the learner is able to: | | |To achieve a merit grade the evidence must show that the learner is able to: | | |To achieve a distinction grade the evidence must show that the learner is able to: | | |1 – Design and develop code using structured programming methods |P1.1 |Identify and select appropriate pre-defined data types | |M1.2 |Complex problems with more than one variable have been explored | |D1.4 |Realistic improvements have been proposed against defined characteristics for success | | | |P1.2 |Use simple input/output and appropriate operators with the above | |M2.2 |A range of methods and techniques have been applied | |D2.4 |The unforeseen has been accommodated | | | |P1.3 |Identify and use appropriate selection structures and loop structures for the given task | |M2.4 |The selection/design of methods and techniques/sources has been justified | |D3.1 |Ideas have been generated and decisions taken | | | |P1.4 |Produce programs to desired standards | |M3.1 |Appropriate structure and approach has been used | |D3.5 |Innovation and creative thought have been applied | | |2 – Use modularisation appropriate to the chosen programming language |P2.1 |Construct a program from a design and use appropriate functions/procedures | | | | | | | | |3 – Produce appropriate documentation for a given program applications |P3.1 |Produce user documentation for a completed programming application including the user interface design | | | | | | | | | |P3.2 |Develop documentation for a predescribed program application | | | | | | | | |4 – Create and apply appropriate test schedules |P4.1 |Demonstrate discrimination between semantic and syntax errors | | | | | | | | | |P4.2 |Produce test documentation | | | | | | | | | |P4.3 |Successfully construct and use test data and schedules to detect logic errors | | | | | | | | | |P4.4 |Use appropriate techniques for detecting errors | | | | | | | | |…...

Similar Documents

Premium Essay

Code

...Pseudocode syntax, descriptions and examples Overview: This table provides a reference for commonly used pseudocode for introductory computer program design courses. You should use this as your reference and copy and paste code examples into your projects to ensure you are using proper syntax. Be sure to indent your code to make it more readable and use modify and enhance from the examples as needed. Also, capitalize the first letter of your pseudocode (e.g. While, not while). Pseudocode Write/Prompt Description Displays messages and other information on the screen Flowchart equivalent Write “What is your name?” Input Pauses execution, allowing the user to enter data Input FirstName Input FirstName Compute/Set Assigns a value to a variable Set Avg=(num1+num2)/2 Declare Example usage Write “What is your name?” Write “Your name is “ +YourName + “.” Prompt for ItemName, Price, Quantity Declares a variable to be of a specific type Input Number1, Number2 Compute average value: Set Avg= (num1 + num2)/2 Compute total cost: Set TotalCost= 1.25*Songs Declare FirstName As String Declare FirstName as String Declare Num1, Num2 As Integer Possible datatypes may include: String 1 Call Requests a module, subprogram, or function be executed Call WriteNums(num1, num2)) If End If Tests if a condition is met. If the test condition is true, the statements are executed. Enter Is Number < 5? Character Integer Float Main Module Write “Enter 2 numbers” Input Num1,Num2 Call......

Words: 712 - Pages: 3

Premium Essay

Code of Ethics

...AAMA Code of Ethics Robin Doyle Rasmussen College Author Note This paper is being submitted on July 8, 2012, for Tonja King’s MA110 Clinical Skills I Section OCA-3A course. AAMA Code of Ethics The mission of the AAMA is to make sure that medical assistants are provided with what they need to be professional. They provide the medical assistant with the proper education for certification and credential acknowledgment. The AAMA makes sure that the medical assistant understands what is meant by being an advocate for quality patient care. The medical assistant must also stay within their scope of practice when speaking to them in order to receive protection from the AAMA. Medical Assistant Career A medical assistant has numerous duties that range from administrative to clinical. What a medical assistant does depends upon location, size, and specialty of the office they employed in. Medical assistants can do administrative jobs which include anything from answering the phone to updating and filing patient records and billing to name a few. Clinical duties for a medical assistant can vary from state to state. The duties include but are not limited to patient medical histories, assisting during an exam, administering medications, and removing sutures. Membership A member can be anyone who has completed an accredited or is currently taking a medical assistant program. You can become a member after taking the exam offered by the AAMA through the same people who......

Words: 1553 - Pages: 7

Free Essay

Codes

...ALT Codes - Alt Codes for Maths / Mathematics Welcome to Useful Shortcuts, THE Alt Code resource! If you are already familiar with using alt codes, simply select the alt code category you need from the table below. If you need help using alt codes find and note down the alt code you need then visit our instructions for using alt codes page. List of Alt Codes for entering Mathematical Symbols ALT Codes for Mathematical Symbols | Alt Code | Symbol | Description | Alt 48 - 57 | 0 - 9 | zero to nine | Alt Codes for Basic Operators | Alt Code | Symbol | Description | Alt 43 | + | Plus Sign | Alt 45 | - | Minus Sign | Alt 0215 | × | Multiplication Sign | Alt 0247 | ÷ | Obelus / Division ign | Alt Codes for Pers | Alt Code | Symbol | Description | Alt 37 | % | Percentage Sign | Alt 0137 | ‰ | Per mille (per thousand) | Alt Codes for Bracketing | Alt Code | Symbol | Description | Alt 40 | ( | Open Bracket | Alt 41 | ) | Close Bracked | Alt Codes for Degree of Accuracy | Alt Code | Symbol | Description | Alt 241 | ± | Plus or Minus | Alt Codes for Fractions | Alt Code | Symbol | Description | Alt 47 | / | Fraction seperator | Alt 0188 | ¼ | Quarter | Alt 0189 | ½ | Half | Alt 0190 | ¾ | Three quarters | Alt 46 | . | Decimal Point | Alt Codes for Equality | Alt Code | Symbol | Description | Alt 240 | ≡ | Exactly Identical | Alt 61 | = | Equals ...

Words: 513 - Pages: 3

Free Essay

Code

..."The code of the streets is actually a cultural adaptation to a profound lack of faith in the police and the judicial system. The police are most often seen as representing the dominant white society and not caring to protect inner- city residents. When called, they may not respond, which is one reason many residents feel they must be prepared to take extraordinary measures to defend themselves and their loved ones against those who are inclined to aggression. Lack of police accountability has in fact been incorporated into the status system: the person who is believed capable of "taking care of himself" is accorded a certain deference, which translates into a sense of physical and psychological control. Thus the street code emerges where the influence of the police ends and personal responsibility for one's safety is felt to begin. Exacerbated by the proliferation of drugs and easy access to guns, this volatile situation results in the ability of the street oriented minority (or those who effectively "go for bad") to dominate the public spaces." (Anderson, Code of the Street). Anderson main argument in his research is that the behavior of many youths is influenced by the street culture or code. This “code” governs how youth from the inner city will react in a violent manor when faced with impersonal attacks or any show of disrespect. Through Anderson’s study he was able to give us the day to day struggle for some inner city children, and why they were unable to express......

Words: 381 - Pages: 2

Free Essay

Anderson's the Code

...Describe the major elements of what Anderson calls “the code of the streets.” How does this “code” oppose mainstream values? The code is really only alive in the ghetto, while it may reach parts of the suburbs it is not as predominant as in the ghettos. At the core of the code is respect, the code was described as the framework for gaining respect on the street, along with respect is loyalty and honor. The respect is getting respect and not giving the respect to any person of authority, such as parent or a cop. The loyalty is given to your street family not necessarily to your real family or people of authority again and honor is very similiar to respect. These values are described as what one needs to know to survive on the streets. Survival on the street is the important thing, and obtaining respect is imperative even if it costs your life. Obtaining respect, loyalty or honor on the streets are obtained through very different means than if you were in the suburbs or growing up in a middle to upper class neighborhood. Not only the way these are obtained different but also they are different from the mainstream in who is the receipent of them. To obtain respect, loyalty or honor it is achieved through aggressive behavior not as you would if you grew up in a middle or upper class suburb. For example one would gain respect in the ghetto by stealing something coveted by another person and then displaying the theft proudly. These values are also obtained through......

Words: 1627 - Pages: 7

Free Essay

To Do or Not to Do

...Draft: Critique Paper To Do or Not to Do? : A Critique of "Disobedience as a Psychological and Moral Problem Do we do it or do we not do is always the big question, is it not? In the article “Disobedience as a Psychological and Moral Problem”, Erich Fromm explains how society has always defined “obedience is a virtue and that disobedience is a vice” (p. 683). As a well known writer and thinker, Psychoanalyst, philosopher, historian and sociologist, Fromm believed that “human history began with an act of disobedience, and it is not unlikely that it will be, terminated by an act of obedience” (p. 683). How many of us have done something without even thinking about it simply because we were told to do it? That is exactly where Fromm is going with this article. Are we doing something because we are told to or are we doing it because we are scared of what may happen if we don’t? But is that always the right answer? Although Fromm’s ideas were organized and the evidence he used to support his argument was effective, the counter argument is missing. Fromm is trying to get us to understand that by man being introduced to the world by disobedience, whether it be from Adam and Eve or Prometheus, we now have to answer to a authority figure, which in return having to obey to that authority figure will end the world. Fromm’s fear and worry is just that. If we get in the habit and routine of doing something simply because we are told to do it, what is going to......

Words: 1369 - Pages: 6

Premium Essay

Code Switching

...Code Switching Code Switching, in terms of language, is the use of more than one language, by a person or more, during their conversations with each other. Code Switching is done simply because those persons know more than one language and have more than one language in common. This switch may last for a couple of sentences, for only a single phrase or may be only for a single word. It depends on how the persons take it with themselves and the others. In the article Code Switching it is written that “the switch is commonly made according to the subject of discourse, but may be for a variety of other reasons such as the mood of the speaker. For example, a person might only swear in French Language” ( 1 ). As described in the article Code Switching, there are number of situations why code switching occurs: A family that has recently immigrated to a country where a different language is spoken may switch back and forth between that language and their mother tongue, while they are learning the new language……...(this phenomenon is Morocco, Tunisia and Algeria)……………… Also, in countries with a large number of people from different ethnic backgrounds, communities will commonly switch between the language of their indigenous roots……….. code switching regularly happens between North American Mormon missionaries stationed overseas.”( 1 ) Because of the effectiveness of code switching it is widely used during our conversation. Code switching helps us to express......

Words: 2662 - Pages: 11

Free Essay

Google Code

...Using Google Code and SVN to Manager project Source Code Sep. 3 Project Source Code Manager on Google Code Using NetBean IDE and SVN 1 MrToanDH * C0907i * FptAptech Using Google Code and SVN to Manager project Source Code Sep. 3 Contents I. Google Code là gì? ............................................................................................................. 3 II. 4 bước để tạo Project trên Google Code:.......................................................................... 4 III. Thiết lập các chức năng cho project : ............................................................................. 7 1.Trang chủ project (Project Home) : ................................................................................ 7 2.Thêm và quản lý các thành viên của 1 project : ............................................................. 8 3.Chức năng download : .................................................................................................... 9 4.Xóa project : ................................................................................................................. 11 IV. Giới Thiệu Về Subversion: .............................................................................................. 12 V. 2 cách cơ bản để quản lý Source code với SVN : ............................................................ 13 1.Thao tác với file và Folder : .............................................................................................

Words: 2085 - Pages: 9

Free Essay

Code

...This  is  CS50.   Harvard  College  Fall  2010   Problem  Set  3:  The  Game  of  Fifteen     due  by  7:00pm  on  Fri  10/1     Per  the  directions  at  this  document’s  end,  submitting  this  problem  set  involves  submitting  source  code   on  cloud.cs50.net  as  well  as  filling  out  a  Web-­‐based  form  (the  latter  of  which  will  be  available  after   lecture  on  Wed  9/29),  which  may  take  a  few  minutes,  so  best  not  to  wait  until  the  very  last  minute,     lest  you  spend  a  late  day  unnecessarily.     Be  sure  that  your  code  is  thoroughly  commented   to  such  an  extent  that  lines’  functionality  is  apparent  from  comments  alone.       Goals.     •   Introduce  you  to  larger  programs  and  programs  with  multiple  source  files.   •   Empower  you  with  Makefiles.   •   Implement  a  party  favor.       Recommended  Reading.     •   Section  17  of  http://www.howstuffworks.com/c.htm.   •   Chapters  20  and  23  of  Absolute  Beginner’s ......

Words: 4248 - Pages: 17

Free Essay

Code

...States by corporations, institutions, and other organizations. For more information, please contact the Special Markets Department at the Perseus Books Group, 11 Cambridge Center, Cambridge MA 02142, or call (617) 252-5298, (800) 255-1514 or e-mail special.markets@perseusbooks.com. CIP catalog record for this book is available from the Library of Congress. ISBN-10: 0–465–03914–6 ISBN-13: 978–0–465–03914–2 06 07 08 09 / 10 9 8 7 6 5 4 3 2 1 Code version 1.0 FOR CHARLIE NESSON, WHOSE EVERY IDEA SEEMS CRAZY FOR ABOUT A YEAR. Code version 2.0 TO WIKIPEDIA, THE ONE SURPRISE THAT TEACHES MORE THAN EVERYTHING HERE. C O N T E N T S Preface to the Second Edition Preface to the First Edition Chapter 1. Code Is Law Chapter 2. Four Puzzles from Cyberspace PART I: “REGULABILITY” ix xiii 1 9 Chapter 3. Is-Ism: Is the Way It Is the Way It Must Be? Chapter 4. Architectures of Control Chapter 5. Regulating Code PART II: REGULATION BY CODE 31 38 61 Chapter 6. Cyberspaces Chapter 7. What Things Regulate Chapter 8. The Limits in Open Code PART III: LATENT AMBIGUITIES 83 120 138 Chapter 9. Translation Chapter 10. Intellectual Property Chapter 11. Privacy Chapter 12. Free Speech Chapter 13. Interlude PART IV: COMPETING SOVEREIGNS 157 169 200 233 276 Chapter 14. Sovereignty Chapter 15. Competition Among Sovereigns 281 294 PART V: RESPONSES Chapter 16. The Problems We Face Chapter 17. Responses Chapter 18. What Declan Doesn’t Get Appendix Notes......

Words: 190498 - Pages: 762

Premium Essay

Code of Ethics

...Code of Ethics One word: Enron. Most people that follow business know that corporation’s name. In November, 2001 the company admitted to using faulty accounting that had inflated income figures over a four year period of $586 million and a month later the company filed for Chapter 11 bankruptcy (Maxwell, 2003, p. 1). Enron’s executives were not following a code of ethics designed to help protect against dishonest business practices and unethical principles. Following good common sense and treating others the way that you would want to be treated is good ethical behavior. Ethics, however, always comes down to being a personal choice and making the decision to do what is right, instead of what is wrong. A code of ethics can provide direction for a company on how the company plans to direct and implement its vision and the best way for the employees to help enable that vision. Most companies today post their code of ethics on their websites so consumers can see what they signify and stand up for as a business. Ethical Tone and Structure Costco is a business that many consumers are familiar with. They are a membership chain of warehouses that provide a wide array of merchandise, most of the time that merchandise is purchased in bulk quantities. Their code of ethics is pretty simple. “1. Obey the Law 2. Take Care of our Members 3. Take Care of our Employees 4. Respect our Suppliers 5. Reward our Shareholders” (Costco). Not to difficult and easily manageable. ...

Words: 1350 - Pages: 6

Free Essay

Code

... • TABLE OF CONTENTS INTRODUCTION . . . . . . . . . . . . . . . . . ix WHAT IS A BRO? ................... 1 BROCABULARY .................... 3 ORIGIN . ........................... 5 THE BRO CODE .................... 9 · · AMENDMENTS .................. 188 VIOLATIONS. . . . . . . . . . . . . . . . . . . . . 191 GLOSSARY ....................... 193 .. VII • ' • • ' ' • • • • • INTRODUCTION u .... her we know it or not, each of us lives a life governed by an internalized code of conduct. Some call it morality. Others call it religion. I call it "the Bro Code." For centuries men have attempted to follow this code with no universal understanding of what such an arrangement meant: Is it okay to hug a Bro?-'} If I'm invited to a Bro's wedding, do I really have to bring a gift?t Can I sleep with a Bro's sister or mother or both?* Now, for the first time on paper, I have recorded the rules of social decorum that Bros have practiced since the dawn of man ... if not before. The Bro Code previously existed only as an oral tradition (heh), so I have journeyed the globe to piece *Never. t Nope. ~ Dude. Come on. • • • lX ' • • together and transcribe the scattered fragments of the Bro Code, pausing only to flesh it out myself (double heh). While not intending to write a "Guide to Being a Bro," if men should treat it as such and pass this compendium of knowledge from......

Words: 4248 - Pages: 17

Premium Essay

Clean Code

... Clean Code Robert C. Martin Series The mission of this series is to improve the state of the art of software craftsmanship. The books in this series are technical, pragmatic, and substantial. The authors are highly experienced craftsmen and professionals dedicated to writing about what actually works in practice, as opposed to what might work in theory. You will read about what the author has done, not what he thinks you should do. If the book is about programming, there will be lots of code. If the book is about managing, there will be lots of case studies from real projects. These are the books that all serious practitioners will have on their bookshelves. These are the books that will be remembered for making a difference and for guiding professionals to become true craftsman. Managing Agile Projects Sanjiv Augustine Agile Estimating and Planning Mike Cohn Working Effectively with Legacy Code Michael C. Feathers Agile Java™: Crafting Code with Test-Driven Development Jeff Langr Agile Principles, Patterns, and Practices in C# Robert C. Martin and Micah Martin Agile Software Development: Principles, Patterns, and Practices Robert C. Martin Clean Code: A Handbook of Agile Software Craftsmanship Robert C. Martin UML For Java™ Programmers Robert C. Martin Fit for Developing Software: Framework for Integrated Tests Rick Mugridge and Ward Cunningham Agile Software Development with SCRUM Ken Schwaber and Mike Beedle Extreme Software Engineering: A Hands on Approach Daniel H....

Words: 20864 - Pages: 84

Premium Essay

Code

...Cleveland State University | Name: | Jadira Yacila | Course: | ACT 451: Auditing | Term: | Spring 2012 | Assignment: | Code 3 | Date: | 4/4/2012 | 1. Access the glossary (Master Glossary) to answer the following. a. What is the definition of “ordinary income” (loss) (740-270-20) Ordinary income (or loss) refers to income (or loss) from continuing operations before income taxes (or benefits) excluding significant unusual or infrequently occurring items. Extraordinary items, discontinued operations, and cumulative effects of changes in accounting principles are also excluded from this term. The term is not used in the income tax context of ordinary income versus capital gain. The meaning of unusual or infrequently occurring items is consistent with their use in the definition of the term extraordinary item. Ordinary income is income (or loss) exclusively from operations. Taxes expenses are not deducted. It does not include capital gains, or any other gain that could be infrequent or unusual. b. What is an error in previously issued financial statements? (250-10-20) An error in recognition, measurement, presentation, or disclosure in financial statements resulting from mathematical mistakes, mistakes in the application of generally accepted accounting principles (GAAP), or oversight or misuse of facts that existed at the time the financial statements were prepared. A change from an accounting principle that is not generally accepted to one that is...

Words: 1120 - Pages: 5

Free Essay

Codes

...judgmentally- There are a lot of people who judge you on a day to day bases. When you think about it so many people that have businesses judge people before they actually meet the people. Some really don’t know they are doing this until they sit and think about it. Such as when you go to a bank and apply for a loan they judge you by you background. So think about it it’s very hard when you have your own business when trying not to be judgmentally. 3. Face and solve problems – Some people don’t like to face and solve problems when running a large business. But when you own up to your own mistakes things will run a lot smoother. I say this because you have some business that will not face and solve any problems they will have someone else do the dirty work for them when who opened the business knows more about the product they are selling. 4. Running a successful business- I say this because most people don’t keep their business open for a long period of time. They tend to fail at what they are trying to build. Know how to spend the money you are making will help you in the near future. 5. Is fiscally conservative- being in sales as long as I have you have to have a great attitude when dealing with customers? They say the customer is always right no matter what we may think. 6. Invest in the business- there are lots of people who don’t really invest in their own business. Such as my dad he had a lawn service and had the business for a long time when it came......

Words: 536 - Pages: 3