[ad_1]
Get college assignment help at uniessay writers Write a program that translates a letter grade into a number grade. Letter grades are A, B, C, D, F, possibly followed by or -. Their corresponding numeric values are 4, 3, 2, 1, and 0. There is no F or F-. A increases the numeric value by 0.3; a – decreases it by 0.3. However, an A has the value 4.0
Write a SELECT statement that returns the InvoiceNumber and balance due for every invoice with a non-zero balance and an InvoiceDueDate that’s less than 30 days from today
Karel the Robot – The Gentle Art Of Computer Programming CIS 6 – Assignment 6 ********Solving the Problems******************** In the Problem Set (4.10): do problems 1 through 4, and draw a simple flowchart for each of the problems. The worlds for each of these problems are either completely empty or almost empty and therefore have not been created or posted. Write these up as separate complete programs or if you prefer a single program which contains all five of the new-instructions. The Execution block should consist of each of the five new-instructions. The flowcharts can be done in Microsoft Office. Both Excel and PowerPoint, at least as far back as Office XP (2002), have an enhanced flowchart drawing capability, but unfortunately not Word. This makes the drawings considerably easier. The most useful enhancement is that flowlines will permanently attach themselves to the flowchart symbols at the “sizing handles” which enables you to move or resize the symbols without having to redo the flowlines in most cases. There are a number of freeware and shareware flowcharting programs available as well, and I will post an update tomorrow with a list of several good ones. If anyone has any personal recomendations I would welcome them too. Problem 1 could use a bit more explanation. The second version of the face-south instruction should USE the face-north instruction. It’s not entirely clear that that’s what is being asked for. To summarize: define the face-north instruction, use the face-north instruction, and then do the minimum necessary to go from facing north to facing south.
Karel the Robot: A Gentle Introduction to the Art of Programming CIS 6 – Assignment 6 ********Solving the Problems********************THESE ARE ON PAGE 87********** In the Problem Set (4.10): do problems 1 through 4, and draw a simple flowchart for each of the problems. The worlds for each of these problems are either completely empty or almost empty and therefore have not been created or posted. Write these up as separate complete programs or if you prefer a single program which contains all five of the new-instructions. The Execution block should consist of each of the five new-instructions. The flowcharts can be done in Microsoft Office. Both Excel and PowerPoint, at least as far back as Office XP (2002), have an enhanced flowchart drawing capability, but unfortunately not Word. This makes the drawings considerably easier. The most useful enhancement is that flowlines will permanently attach themselves to the flowchart symbols at the “sizing handles” which enables you to move or resize the symbols without having to redo the flowlines in most cases. There are a number of freeware and shareware flowcharting programs available as well, and I will post an update tomorrow with a list of several good ones. If anyone has any personal recomendations I would welcome them too. Problem 1 could use a bit more explanation. The second version of the face-south instruction should USE the face-north instruction. It’s not entirely clear that that’s what is being asked for. To summarize: define the face-north instruction, use the face-north instruction, and then do the minimum necessary to go from facing north to facing south.
This is from Karel the Robot: A Gentle Intro to the Art of Programming (Page 59)
Problems from Karel the Robot, page 87 (1-4)
Design a modular program that ask the user to enter the monthly costs for the following expenses incurred from operating his or her automobile: loan payment, insurance, gas, oil, tires, and maintenance. The program should then display the total monthly cost of these expenses, and the total annual cost of these expenses.
Project 3: A Custom malloc() Due: November 2,2010 Description In our discussions of dynamic memory management we discussed the operation of the standard C library call, malloc(). Malloc designates a region of a process’s address space from the symbol _end (where the code and global data ends) to brk as the heap. As part of dynamic memory management, we also discussed various algorithms for the management of the empty spaces that may be created after a malloc()-managed heap has had some of it’s allocations freed. In this assignment, you are asked to create your own version of malloc, one that uses the next-fit algorithm. New brk Details We are programmatically able to grow or shrink the size of the heap by setting new values of brk. The function sbrk() handles scaling the brk value by its parameter: void *sbrk(intptr_t increment); DESCRIPTION brk sets the end of the data segment to the value specified by end_data_segment, when that value is reasonable, the system does have enough memory and the process does not exceed its max data size (see setrlimit(2)). sbrk increments the program’s data space by increment bytes. sbrk isn’t a system call, it is just a C library wrapper. Calling sbrk with an increment of 0 can be used to find the current location of the program break. RETURN VALUE On success, brk returns zero, and sbrk returns a pointer to the start of the new area. On error, -1 is returned, and errno is set to ENOMEM. A simple place to start then is to create a malloc which, with each request, simply increments brk by the amount requested and returns the old value of brk as the pointer. However, when you want to write a free() function, the parameter to free() is just a pointer to the start of the region, so you have no way to determine how much space to deallocate. In order to know what space is free or used, and how big each region is, we must use one of the techniques from class: Bitmaps or Linked lists. From our discussion in class, linked lists seem like the better choice, but now we need some place to store this dynamic list of free and occupied memory regions inside of the heap. If we just allocated some fixed-size region, that space may not be adequate for how many nodes in the list we’d need to create. A better idea is illustrated in the figure below: We can add some additional space to each update of brk in order to accommodate a structure that is a node in our linked list, and this structure can contain useful things like: * The size of this chunk of memory * Whether it is free or empty * A pointer to the next node * A pointer to the previous node We then return back a pointer that is in the middle of the chunk we allocated, and thus the program calling malloc() will never notice the additional structure. However, when we get a pointer back to free, we can simply look at the memory before it for the structure that we wrote there with the information we need. Requirements You are to create two functions for this project. 1. A malloc() replacement called void *my_nextfit_malloc(int size) that allocates memory using the next fit algorithm. Again, if no empty space is big enough, allocate more via sbrk(). 2. A free() called void my_free(void *ptr) that deallocates a pointer that was originally allocated by the malloc you wrote above. Your free function should coalesce adjacent free blocks as we described in class. If the block that touches brk is free, you should use sbrk() with a negative offset to reduce the size of the heap. As you are developing, you will want to create a driver program that tests your calls to your mallocs and frees. A week before the due date, I will provide a sample driver program that must work. During grading, we will use a second driver program in addition to the first one in order to test that your code works. Environment For this project we will again be working on thot.cs.pitt.edu This machine is a 64-bit machine, and to avoid pointer cast warnings, build using the -m32 option for gcc. This will build a 32-bit program instead of 64-bits. Hints/Notes * When you manually change brk with sbrk, you may not call malloc or mmap, as they may have unintended consequences. All allocations will have to be done with your new custom malloc(). * In C, the sentinel value for the end of a linked list is having the next pointer set to NULL. * Make sure you don’t lose the beginning or end of your linked list. You may want 2 global variables to keep track of either end * sbrk(0) will tell you the current value of brk which can help in debugging * gdb is your friend, no matter what you think after project 2 What to turn in * A header file named mymalloc.h with the implementations of your two functions * The test program you used during your initial testing * Any documentation you provide to help us grade your project To create a tar.gz file, if your code is in a folder named project3, execute the following commands: tar cvf USERNAME-project3.tar project3 gzip USERNAME-project3.tar Where USERNAME is your username. Then copy your file to: ~jrmst106/submit/449/ Create a Custom Malloc C program Requirements You are to create two functions for this project. 1. A malloc() replacement called void *my_nextfit_malloc(int size) that allocates memory using the next fit algorithm. Again, if no empty space is big enough, allocate more via sbrk(). 2. A free() called void my_free(void *ptr) that deallocates a pointer that was originally allocated by the malloc you wrote above. Your free function should coalesce adjacent free blocks as we described in class. If the block that touches brk is free, you should use sbrk() with a negative offset to reduce the size of the heap. As you are developing, you will want to create a driver program that tests your calls to your mallocs and frees.
hi I am attaching a word document and 4 dat file which are the project data
“basic programming flowchart needed with arrays Watson Elementary School contains 30 classrooms numbered 1 through 30. Each classroom can contain any number of students up to 35. Each student takes an achievement test at the end of the school year and receives a score from 0 to 100. Write a program that accepts data for each student in the school – Student ID, classroom number, and score on the achievement test. Design a program that lists the total points scored for each of the 30 classrooms. ”
Get college assignment help at uniessay writers one technological device in 350 to 700 words. Include the following: When did it come (or will it potentially come) into existence? What scientific or technological reasoning explains how this potential has been (or can be) be reached?
Q4. Consider transferring an enormous file of L bytes from host A to host B. Assume an MSS (Maximum Segment Size) of 1460 bytes. a) What is the maximum value of L such that TCP sequence numbers are not exhausted? Recall that the TCP sequence number filed has four bytes. b) For the L you obtain in (a), find how long it takes to transmit the file. Assume that a total of 66 bytes of transport, network and data-link header are added to each segment before the resulting packet is sent out over a 10 Mbps link. Ignore flow control and congestion control so A can pump out the segments back to back and continuously
I have to modify this code to make a simulation so there are several independent queues. How could i go about doing this with using the following source code.
Create a database using the three tables: one for student information, one for advisor information, and one for department information. It may be an Access database or created using the VB data manager
Write a program in C that calculates and displays the average number of days a company’s employees are absent.
It has been said that you do not need database management software to create a database environment. Discuss.
Security is not just a technology issue; it is a business issue. Discuss.
“i have question about this problem , can you help me? You have just been hired by the accounting firm More
basic programming flowchart with arrays The Billy Goat Fast-Food restaurant sells the following products: _____________________________________ Product Price($) _____________________________________ Cheeseburger 2.49 Pepsi 1.00 Chips 0.59 _____________________________________ Design the logic for an application that allows a user to enter an ordered item continuously until a sentinel value is entered. After each item,display its price or the message “Sorry, we do not carry that” as output.After all items have been entered, display the total price for the order.
(10 marks) Chapter 4, Programming 10, p. 169. The checkout-line simulation in Figure 4-4 can be extended to investigate important practical questions about how waiting lines behave. As a first step, rewrite the simulation so that there are several independent queues, as it usually the case in supermarkets. A customer arriving at the checkout area finds the shortest checkout line and enters that queue. Your revised simulation should calculate the same results as the simulation in the chapter. I have attached the code so far as a text.
The brilliant mathematician Srinivasa Ramanujan found an infinite series that can be used to generate a numerical approximation of π: 2 √ 2 ∞ (4k)!(1103 26390k) 1 = ∑ π (k!)4 3964k 9801 k=0 Write a function called estimate_pi that uses this formula to compute and return an estimate of π. It should use a while loop to compute terms of the summation until the last term is smaller than 1e-15 (which is Python notation for 10−15). You can check the result by comparing it to math.pi.
The post Write a program that translates a letter grade into a number appeared first on uniessay writers.
[ad_2]
Source link