Categories
Uncategorized

Driving 6 – 20 mph over the speed limit receives a $75 ticket.

Learning Goal: I’m working on a c# question and need an explanation and answer to help me learn.
Lab2-Speeding ticket
Write a program that is given two integers representing a speed limit and driving speed in miles per hour (mph) and outputs thetraffic ticket amount.
Driving 10 mph under the speed limit (or slower) receives a $50 ticket. Driving 6 – 20 mph over the speed limit receives a $75 ticket. Driving 21 – 40 mph over the speed limit receives a $150 ticket. Driving faster than 40 mph over the speed limit receives a $300 ticket. Otherwise, no ticket is received.
Ex: If the input is:
35 45
the output is:
75
Ex: If the input is:
35 26
the output is:
0Lab3-Remove the gray part
Summary: Given integer values for red, green, and blue, subtract the gray from each value.
Computers represent color by combining the sub-colors red, green, and blue (rgb). Each sub-color’s value can range from 0 to 255. Thus (255, 0, 0) is bright red, (130, 0, 130) is a medium purple, (0, 0, 0) is black, (255, 255, 255) is white, and (40, 40, 40) is a dark gray. (130, 50, 130) is a faded purple, due to the (50, 50, 50) gray part. (In other words, equal amounts of red, green, blue yield gray).
Given values for red, green, and blue, remove the gray part.
Ex: If the input is:
130 50 130
the output is:
80 0 80 Find the smallest value, and then subtract it from all three values, thus removing the gray.
Assignment 4
Part 1 (30points) Evaluate the Relational and Logical expressions in 09 Logical Operators.ppt Download 09 Logical Operators.ppt(9.8 Practice part page from the slides )
Put these expressions in a small program that will demonstrate whether they are true or false. Paste the code, and output from the program into your submission. Use if statements and output a message indicating that the expression is True or False.
Part 2(70 points)Write a C program (with meaningful comments) to solve a problem described in English.
We want to count how many passing grades are entered. We don’t know how many grades there will be. Use a sentinel controlled while loop that will ask the user to enter student grades until a value of -1 is entered. Use a counter variable to count all the grades that are passing grades, where 70 is the minimum passing grade. If there are any grades that are out of the range 0 – 100, present an error message to the user, and do not count that grade as passing. We also would like to see what percentage of the valid grades are passing.
Create two more test cases.
Use following one in addition to the two you create.
Grades Entered: Expected Results
45
90
70
87
123 “That is not a valid grade!”
100
-1 You entered 4 passing grades.
80.0% of the valid grades entered are passing grades.
Deliverables: Paste code, program output and screen shots into one Word document. Presenting your solution is part of the assignment.
Solution to Part 1(paste code and screen shot/s of the output window) – the relational/logical expressions. (20 points)
The code that solves the passing grades problem. Remember to use meaningful comments. (70 points)
Output from running the program 3 different times. Use two test cases that you created and the one I have given you. (10 points
(please each assignment has to be in a different file doc with screenshots of work also has to be in the same file.)

Categories
Uncategorized

Lab2-speeding ticket

Learning Goal: I’m working on a c# and need to help me learn.
Lab2-Speeding ticket
Start Assignment

Categories
Uncategorized

Elaborate this theory in your own words by agreeing or disagreeing.

Learning Goal: I’m working on a c# question and need guidance to help me learn.
Post your answer to the Question (100 – 300 words):
“It is very important for the Systems integration process to start before and continue during design activity–or anyone will end up redesigning needlessly.”
Elaborate this theory in your own words by agreeing or disagreeing. Be firm in your reasoning.

Categories
Uncategorized

Learning Goal: I’m working on a c# practice test / quiz and need guidance to hel

Learning Goal: I’m working on a c# practice test / quiz and need guidance to help me learn.
Assignment 2 I/O and Arithmetic
Goal: In this unit, we learned about the different arithmetic operators and using input and output in C. In this program, you will practice these skills.
The objective here is that you get familiar with the arithmetic operators and follow along. More code is better than less code for this part. It must be a program that compiles and runs.
Part1.[80 points] In this part you will solve a problem described in English.
You are going to write one C program that asks the user to input two numbers. Then your program should output the difference (subtraction) of those two numbers, product (multiplication) of the same two numbers that the user entered, and the square of each of the two numbers. To square a number, multiply the number by itself.
You can use the int data type for this assignment. Please note that your program should work for any two numbers entered by the user and not just those shown in following test case scenario. You need to write only one program that accomplishes all the required tasks of subtraction, squaring and multiplication.
Interaction with your program might look like this:
====================================================
Enter the first number: 7
You entered 7
Enter the second number: 5
You entered 5
The difference is 2.
The product is 35.
Square of 7 is 49.
Square of 5 is 25.
Thank you.
Part 2.[20 points] – Research and write definitions for the following terms-
Hardware
CPU
Memory-RAM
Memory-ROM
C Source Code
camelCase
compiler
computer language
computer program
Flow Chart
Software
Input
Logic Error
order of operations
Output
Programmer
Pseudo Code
Syntax Error
Testing
Text Editor
====================================================
Submission requirements:
Paste the C source code for Part 1 to a word document, and attach a screenshot of compiled result.
Include answers for part 2 terms in the same Word document.
Send email in Canvas if you are stuck, or if there is something in this that you are confused about.
Notice the due date on this one and plan accordingly.
Instructions
This quiz is comprised of 10 multiple choice questions to test your knowledge of what we have learned in the first two modules in these areas:
variables
data types
operators
I/O
programming fundamentals.
You have two attempts to take this quiz and unlimited time for each attempt.

Categories
Uncategorized

Hello world!

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!