Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask C/C++ Expert


Home >> C/C++

Objective: Create a C++ console application that will model the characteristics of a resistor. Create a multifile project. Create and add to the project an h file containing the resistor-class definition. Create and add to the project a cpp file containing the implementation of the class-member functions. Create and add to the project a ccp file containing the main() function, which will instantiate a resistor object and test its member functions. STEP 2: Required Class Members Back to Top The resistor class will, at minimum, have members that do the following. store the nominal resistance value of a resistor store the tolerance of a resistor initialize any and all nominal-resistance values to correct, EIA, nonzero values that are greater than 0 and less than 1,000,000 ohms initialize any and all resistance-tolerance values to correct, E12, E24, E48, or E96 resistance-tolerance values allow the nominal-resistance and tolerance values of a resistor object to be changed by the user All member functions should have a test message stating the name of the function. All the test messages should be displayed or not displayed, depending on the value of a Boolean variable declared in main(). If the Boolean value = true, display the message. If the Boolean value = false, do not display the message. STEP 3: Program Operations Back to Top Function main() should instatiate two objects of class resistor. Function main() should display the current values of all resistor objects. Function main() should also calculate and display the minimum and maximum in-tolerance resistance values of each resistor object from the resistor data members. Function main() should allow the user to change the values of the nominal resistance and the resistor tolerance of both resistor objects, and it should also correctly handle out of numeric-range input. Main() is also responsible for making sure that the user can successfully enter only correct, EIA resistance and tolerance values. The user should be given the following data-entry choices: accept current EIA values for resistance and tolerance; The function main() should display the new, modified values of the resistor object, including the new min and max in-tolerance resistance values. The function main() should be executed twice: once with the test messages displayed and once without. STEP 4: Lab Questions Back to Top You are not required to copy the question text into your document, but all answers should be listed with the question number they answer. List the complete reference-source information for where you found the EIA standard resistor value and tolerance information. How was this reference discovered and where? The constructor requires the initialization values for the nominal resistance and the tolerance when an object is instantiated to be a correct E-series resistance and tolerance combination. Describe how this was accomplished in your program design and implementation. In the lab, you were required to provide mutator functions to change the nominal-resistance and tolerance values of a resistor object. Describe how this was accomplished so that the user could not enter an invalid nominal-resistance and E-series tolerance combination. Describe how this process was different and/or similar to how you implemented this validation in the class constructor.

  1. Submit a single Notepad file containing the source code for Exercise 1 to the Dropbox for Week 2. Your source code should use proper indentation and be error free. Be sure that your last name and the lab number are part of the file name; see the following example: YourLastName_Lab1.txt.

    Each program should include a comment section that includes (at a minimum) your name, the lab and exercise number, and a description of what the program accomplishes.
  2. Submit a lab report (a Word document) containing the following information to the Dropbox for Week 2.
    • Include your name and the exercise number.
    • Specification: Include a brief description of what the program accomplishes, including its input, key processes, and output.
    • Test Plan: Include a brief description of the method you used to confirm that your program worked properly. If necessary, include a clearly labeled table with test cases, predicted results, and actual results.
    • Summary and Conclusions: Include a summary of what the lab demonstrated and any conclusions drawn from the testing of the lab program.
    • Answers to Lab Questions: Answer any and all lab questions included in the lab steps.

Summary: Write a statement summarizing your predicted and actual output. Identify and explain any differences.

Conclusions: Write at least one nontrivial paragraph that explains, in detail, either a significant problem you had and how you solved it or, if you had no significant problems, something you learned by doing the exercise.

Each lab exercise should have a separate section in the lab-report document.

Your lab grade will be based upon

  1. the formatting of your source code;
  2. the use of meaningful identifiers;
  3. the extent of internal documentation;
  4. the degree to which an exercises' specifications are met; and
  5. the completeness of your lab report.

C/C++, Programming

  • Category:- C/C++
  • Reference No.:- M9451829

Have any Question?


Related Questions in C/C++

Assignment word matchingwhats a six-letter word that has an

Assignment: Word Matching What's a six-letter word that has an e as its first, third, and fifth letter? Can you find an anagram of pine grave. Or how about a word that starts and ends with ant (other than ant itself, of ...

Project - space race part a console Project - Space Race Part A: Console Implementation

Project - Space Race Part A: Console Implementation INTRODUCTION This assignment aims to give you a real problem-solving experience, similar to what you might encounter in the workplace. You have been hired to complete a ...

What are the legal requirements with which websites must

What are the legal requirements with which websites must comply in order to meet the needs of persons with disabilities? Why is maximizing accessibility important to everyone?

Why do researcher drop the ewaste and where does it end

Why do researcher drop the ewaste and where does it end up?

Software development fundamentals assignment 1 -details amp

Software Development Fundamentals Assignment 1 - Details & Problems - In this assignment, you are required to answer the short questions, identify error in the code, give output of the code and develop three C# Console P ...

Question 1find the minimum and maximum of a list of numbers

Question: 1. Find the Minimum and Maximum of a List of Numbers: 10 points File: find_min_max.cpp Write a program that reads some number of integers from the user and finds the minimum and maximum numbers in this list. Th ...

1 implement the binary search tree bst in c using the node

1. Implement the Binary Search Tree (BST) in C++, using the Node class template provided below. Please read the provided helper methods in class BST, especially for deleteValue(), make sure you get a fully understanding ...

There are several ways to calculate the pulse width of a

There are several ways to calculate the pulse width of a digital input signal. One method is to directly read the input pin and another method (more efficient) is to use a timer and pin change interrupt. Function startTi ...

Assign ment - genetic algorithmin this assignment you will

ASSIGN MENT - GENETIC ALGORITHM In this assignment, you will use your C programming skills to build a simple Genetic Algorithm. DESCRIPTION OF THE PROGRAM - CORE REQUIREMENTS - REQ1: Command-line arguments The user of yo ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As