Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Software Engineering Expert

1. Critique the following code (written in untested code that resembles C#).

You can assume that it produces correct results (i.e. it updates StudentGrades as desired) assuming the code actually compiles. After critiquing it, please rewrite this code in a way and style that you would normally write it, which is hopefully elegant and beautiful. You're welcome to adapt it to your language of choice or use pseudo-code if you'd like.

class StudentGradeCollector
{
public Dictionary StudentGrades = {...}; // Initialized with keys with the names of all the students in a major university; assume the values for each key are initialized to ""

public Dictionary HonorRoll = { ... } // initially empty

public UpdateScores()
{
foreach (KeyValuePair a in studentgrades){
if (a.Value == "")
{
string c = "SELECT score from students WHERE student_name = '" + a.Key + "'"; // You can assume the score column contains integers between 0 and 100, inclusive, and does not allow NULL values
int d = DB.ExecuteAndReturnFirstColumnFromFirstRow(c);
if (d == 97 || d == 98 || d == 99 || d == 100)
a.Value = "A+";
else if (d == 87 || D == 88 || d == 89)
a.value = "B+";
else if (d == 77 || d == 78 || d == 79)
a.Value = "C+";
else if (d == 67 || d == 68 || d == 69)
a.value = "D+";
else if (d == 93 || d == 94 || D == 95 || d == 96)
a.Value = "A";
else if (d == 83 || d == 84 || d == 85 || d == 86)
a.value = "B";
else if (d == 73 || d == 74 || d == 75 || D == 76)
a.Value = "C";
else if (D == 63 || d == 64 || d == 65 || d == 66)
a.value = "D";
else if (d == 90 || d == 91 || D == 92)
a.Value = "A-";
else if (d == 80 || d == 81 || d == 82)
a.value = "B-";
else if (d == 70 || d == 71 || d == 72)
a.Value = "C-";
else if (d == 60 || D == 61 || d == 62)
a.value = "D-";
else if (D < 60)
a.Value = "F";
}

foreach(var g in StudentGrades)
if(g.Value == "A+")
HonorRoll.Add(g.Key, g.Value);
}
}
}

2. Write a class or function in your JavaScript that parses a URL and returns the protocol, hostname, port, path, and query. For simplicity's sake, you can assume the URL won't contain a username, password, and/or fragment. Protocol, hostname, and path should be strings; port should be an integer; query should be an associative array or dictionary with keys/values (it should unescape/decode any escaped query values). For further simplicity, you can assume there will be no duplicate keys in the query part. Include test cases in the form of test code or a list of URLs. Please do not look at or use existing URL parsing libraries/classes/functions when writing this class/method, but you're welcome to consult documentation regarding the HTTP protocol and/or URL syntax.

3. Develop a functional web-based application for a calculator. It does not need to be live; you can provide JavaScript, CSS, and HTML files. The calculator should successfully complete addition, subtraction, multiplication, and division operations.

Software Engineering, Computer Science

  • Category:- Software Engineering
  • Reference No.:- M9893365
  • Price:- $70

Priced at Now at $70, Verified Solution

Have any Question?


Related Questions in Software Engineering

Write review on this article with apa formatalthough

Write review on this article with APA format. Although computer crimes are being seen in our society more and more each day, it is still difficult to prosecute people who commit these crimes mainly because everything is ...

Assignment lab - statement of workclient liberty vacation

Assignment Lab - Statement of Work Client: Liberty Vacation Planning Inc. (LVP) Project: Website Assessment 1. Project Objectives With this statement of work, LVP is engaging you to conduct a website assessment to determ ...

Address the following integrating biblical perspectives

Address the following, integrating biblical perspectives where appropriate: Define a hate crime and describe how white supremacist groups use the Internet to spread their message of hate. Explain why hate crime legislati ...

In this assignment you will answer the following review

In this assignment, you will answer the following review questions from the reading materials of the module/week. 1. "What are the key components of a typical P2P application? Describe their functions." 2. "What are the ...

Write reply to this article with references with apa

Write reply to this article with references with APA bibliography. Hate Crimes Over the past couple of years, hate crimes have been on the rise in America's largest cities. Studies show that there were sharp spikes in th ...

The research paper for this course is about some of the

The research paper for this course is about some of the best sources of digital evidence for child abuse and exploitation, domestic violence, and gambling according to the National Institute of Justice. Research commerci ...

Overviewyou are required to modify and logically extend

Overview You are required to modify and logically extend the functionality of a provided code base to implement a game. This requires you to modify the code base as well as create documentation and implement various user ...

Instructions - onion routingin this assignment you will

INSTRUCTIONS - ONION ROUTING In this assignment, you will answer the following questions related to Onion Routing and Tor. 1. Describe the infrastructure of Onion Routing and explain how it works for providing anonymity ...

Reply to this article with apa referencehate crimes

Reply to this article with APA reference. Hate crimes According to Merriam-Webster, hate crime is any of various crimes (such as assault or defacement of property) when motivated by hostility to the victim as a member of ...

Proposaldesign of an efficient gps tracking system tag for

Proposal Design of an efficient GPS Tracking System (tag) for monitoring small species IMPLEMENTING EMBEDDED SYSTEMS USING SYSML Task Using PapyrusSysML Software (Downloadable online - Evaluation Copy- Latest Version) Mo ...

  • 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